Posts a message to a configured notification provider.
Parameters
Name | Type | Description |
---|---|---|
notify | String, optional | The name of a notifier, or comma separated list of notifiers, set in the Notification configuration. If not provided, all notifiers that have "default":true will be used. The notifiers used will be returned in the sendlist |
message | String, required | The message you would like to post |
Example Request
function(params, credentials) {
let resp = this.callWorkerMethod("notification", "postMessage",{
"notify": "MyFacebookPage",
"message": "A message which will be posted as an update from my page"
});
return resp;
}
Returns
{
"jsonrpc": "2.0",
"id": 170,
"result": {
"success": true,
"sendlist": "MyFacebookPage",
"error": null
}
}
Error Handling
Errors are returned as an array in the result.result.error property. For example
"error": [{
"name": "tweet",
"error": "Could not authenticate you."
}]
Last modified on 31 July 2023