Views: 2434
Last Modified: 04.02.2022
Response to notification, supporting quick reply |
Revision
Get current information about current API revision (platform version) – im.revision.get
: 18 |
Parameters
Parameter |
Example |
Required |
Description |
Revision |
ID |
270 |
Yes |
Notification ID, supporting quick reply |
30 |
ANSWER_TEXT |
'Hello' |
Yes |
Quick reply text |
30 |
|
Called method and response
JavaScript
B24.callMethod(
'im.notify.answer',
{
ID: 270,
ANSWER_TEXT: 'Hello'
},
res => {
if (res.error())
{
console.error(result.error().ex);
}
else
{
console.log(res.data())
}
}
)
Response example
{
"result_message": [
"You response is sent successfully."
]
}
Returns array with messages to your response.
Example of response when passing notification ID not supporting quick reply
{
"result_message": false
}
Example of response on error
{
"error":"NOTIFY_ID_ERROR",
"error_description":"Notification ID can\u0027t be empty"
}
Key description:
error
– error code
error_description
– error brief description
Possible error codes
Code |
Description |
ID_ERROR |
Parameter ID not passed or isn't an integer |
ANSWER_TEXT_ERROR |
Parameter ANSWER_TEXT not passed or isn't an empty string |
|