Get updates
Request Format#
You need to send a POST request to:
https://yoai.yophone.com/api/pub/getUpdatesRequest example#
Request body is empty object
curl -X POST "https://yoai.yophone.com/api/pub/getUpdates" \ -H "Content-Type: application/json" \ -H "X-YoAI-API-Key: your YoAI api key" \ -d '{}'Response data keys#
id
chatId
botId
callbackData
text: base64 encoded string
sender:
Object containing sender information, which includes:
firstName: Sender's first name.lastName: Sender's last name.id: Unique identifier for the sender.chanelId: Channel ID associated with the sender.locale: Locale.countryName: Country code.deviceId: Device id.hash: Hash.
Response example#
{ "code": 200, "success": true, "data": [ { "id": 7, "botId": "bot id", "chatId": "chat id", "text": "", "callbackData": "callback data", "sender": { "id": "sender unique id", "firstName": "John", "lastName": "Doe", "locale": "en", "countryName": "AM", "deviceId": "device id", "hash": "hash" } } ]}