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 |
|---|---|---|
| The phone number of the customer who has sent the message on WhatsApp, number is in E.164 format | 918x98xx21x4 |
| The type of user-event received on your webhook. Must be one of these: | 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 |
|---|---|
| This event is received when the app is in Sandbox mode and you have set a callback URL |
| This event is received when the app is in Sandbox mode and you have used Gupshup proxy bot to invoke your App using command |
| This event is received when an end user opt-in to receive notification from a business |
| This event is received when an end user opt-out from receiving notification from a business |
Updated 6 days ago
In the next chapter of this guide, you'll learn about inbound event type: System events
