Register callback function

Getting response in callback

For every website visitor, you can get the response for subscription prompt i.e. whether the user subscribed to notifications or blocked them. All other responses are mentioned below in Responses. The objective of the callback function is to let you know which all visitors subscribed to notifications so that you can act on them accordingly.


 //Code to write response to database

Sample Response

{"response":"already subscribed","statuscode":2}
{"response":"already blocked","statuscode":4}
{"response":"browser not supported","statuscode":5}
{"response":"prompt closed","statuscode":6}

Sample Code

 console.log("Current Status : "+obj.response);

Updated about a year ago

Register callback function

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.