POST graph.chat.answer
Answer to a user after he pressed a CALLBACK-type button
Внимание! POST-запросы должны выполняться с заголовком Content-Type: application/json;charset=utf-8
This method allows you to respond to a user after he pressed a CALLBACK-type button in a previous message.
This method takes a single parameter:
Name | Type | Required | Description |
---|---|---|---|
callbackId | String | Yes | callback identifier |
Request example
?access_token=tkn18YdUJZe:CQABPOJKAKEKEKEKE
&callbackId=someCallbackId
Request body
In a request body a message must be present.
Message format
Attachments
Message can contain a single or multiple attachments of following type:
- IMAGE - image;
- VIDEO - video;
- AUDIO - audio;
- SHARE - OK content reshare;
- FILE - file of any extension;
- CONTACT - user contact;
- INLINE_KEYBOARD - action buttons structure;
- LOCATION - user location;
- MUSIC - OK music track;
- CALL - information about video / audio call;
- PRESENT - OK present;
- STICKER - OK sticker.
Attachment’s payload depends on its type and can differ.
IMAGE
The image attachment.
There are following ways to send such attachment to a chat:
- specify token from existing message with attachment
- specify token, acquired during image upload using method GET graph.user.fileUploadUrl method
- specify image URL, but only 1 such image can be present in request
VIDEO
The video attachment.
There are following ways to send such attachment to a chat:
- specify token from existing message with attachment
- specify token, acquired during video upload using method GET graph.user.fileUploadUrl method
AUDIO
The audio attachment.
There are following ways to send such attachment to a chat:
- specify token from existing message with attachment
- specify token, acquired during audio upload using method GET graph.user.fileUploadUrl method
FILE
File of any format.
There are following ways to send such attachment to a chat:
- specify token from existing message with attachment
- specify token, acquired during audio upload using method GET graph.user.fileUploadUrl method
SHARE
Reshare of a content previously published on OK. This attachment can contain a link to a group, video, group / user topic, image, etc.
Creation of this type of attachment via botapi is not supported.
CONTACT
OK’s user contact.
There are following ways to send such attachment to a chat:
- specify user identifier
- specify vCard electronic business card data
LOCATION
User’s location.
There are following ways to send such attachment to a chat:
- specify coordinates latitude and longitude (other fields are optional)
MUSIC
OK music track.
There are following ways to send such attachment to a chat:
- specify track identifier
CALL
Video/audio call info.
Creation of this type of attachment via botapi is not supported.
PRESENT
This type of attachment is currently not supported
OK present.
Creation of this type of attachment via botapi is not supported.
STICKER
OK sticker.
There are following ways to send such attachment to a chat:
- specify sticker identifier
INLINE_KEYBOARD
REQUEST_GEO_LOCATION and REQUEST_CONTACT type buttons are currently not supported
Buttons structure.
Buttons list is a two dimensional array where buttons can be placed one on a single line or as a group.
There are following buttons types supported:
- CALLBACK - main type of a button. When pressed by a user a new message is sent to a chat (called callback message);
- LINK - a button that contains a link to another URL;
- REQUEST_CONTACT - request of current user’s contact info;
- REQUEST_GEO_LOCATION - request of current user’s location info.