User events
The payload object
{
"app":"DemoApp",
"timestamp":1580142086287,
"version":2,
"type":"user-event",
"payload":{
"phone":"callbackSetPhone"|"918x98xx21x4",
"type":"sandbox-start"|"opted-in"|"opted-out"
}
}
Key | Description | Example |
---|---|---|
phone | The phone number of the customer who has sent the message on WhatsApp, number is in E.164 format | 918x98xx21x4 |
type | The type of user-event received on your webhook. Must be one of these: sandbox-start , opted-in , opted-out . | Refer to the description given below. |
The types of user-events
{
"app":"DemoApp",
"timestamp":1580142086287,
"version":2,
"type":"user-event",
"payload":{
"phone":"callbackSetPhone",
"type":"sandbox-start"
}
}
{
"app":"DemoApp",
"timestamp":1580227393386,
"version":2,
"type":"user-event",
"payload":{
"phone":"918x98xx21x4",
"type":"sandbox-start"
}
}
{
"app":"DemoApp",
"timestamp":1584541505908,
"version":2,
"type":"user-event",
"payload":{
"phone":"918x98xx21x4",
"type":"opted-in"
}
}
{
"app":"DemoApp",
"timestamp":1584541505908,
"version":2,
"type":"user-event",
"payload":{
"phone":"918x98xx21x4",
"type":"opted-out"
}
}
Type | Description |
---|---|
sandbox-start | This event is received when the app is in Sandbox mode and you have set a callback URL |
sandbox-start | This event is received when the app is in Sandbox mode and you have used Gupshup proxy bot to invoke your App using command Proxy {{app_name}} . |
opted-in | This event is received when an end user opt-in to receive notification from a business |
opted-out | This event is received when an end user opt-out from receiving notification from a business |
Updated over 2 years ago
What’s Next
In the next chapter of this guide, you'll learn about inbound event type: System events