Every method your API can send, and every event it can receive, on one page.
π‘ How to read this
Outgoing methods are requests your API sends to the server. Inbound events are messages the server sends to your API β you receive them by implementing the matching callback.
A β means the SDK exposes a helper for it. A β means it is not available in that SDK.
Outgoing methods β API β Server
Messages
Method | Purpose | Java | JavaScript | Python |
sendMessage | Send a text message | β
| β
| β
|
sendPhoto | Send a photo | β
| β
| β
|
sendVideo | Send a video | β
| β
| β
|
sendAudio | Send an audio file | β
| β
| β
|
sendVoice | Send a voice note | β
| β
| β
|
sendDocument | Send a document | β
| β
| β
|
sendContact | Send a contact card | β
| β
| β
|
sendLocation | Send a location | β
| β
| β
|
sendArticle | Send an article | β
| β
| β
|
updateMessage | Edit a sent message or its caption | β
| β
| β
|
recallMessage | Recall a sent message | β
| β
| β
|
Chats
Method | Purpose | Java | JavaScript | Python |
getChat | Retrieve chat details | β
| β
| β
|
setChat | Update chat details | β
| β
| β
|
createChat | Create a new chat | β
| β
| β
|
getChatMember | Retrieve a member of a chat | β
| β
| β
|
getChatAdministrators | List chat administrators | β
| β
| β
|
addChatMember | Add a member to a chat | β
| β
| β
|
addChatAdmin | Promote a member to administrator | β
| β
| β
|
banChatMember | Ban a member | β
| β
| β
|
unbanChatMember | Lift a ban | β
| β
| β
|
removeChatMember | Remove a member | β
| β
| β
|
Profile & users
Method | Purpose | Java | JavaScript | Python |
getUser | Retrieve a user's details | β
| β
| β
|
getMyProfiles | Retrieve the API's own profile | β
| β
| β
|
setMyProfile | Update the API's own profile | β
| β
| β
|
sendUserNotification | Send an SMS, Email or Push notification to a user | β
| β
| β
|
Menus & workflow
Method | Purpose | Java | JavaScript | Python |
setChatMenu | Set the chat (keypad) menu | β
| β
| β
|
setNavigationButton | Set the navigation button | β
| β
| β
|
updateMenuCell | Write values into component cells | β
| β
| β
|
setWorkflowAction | Move a user through a workflow screen | β
| β
| β
|
inlineSearchAnswer | Answer an inline search | β
| β
| β
|
sendCellMessage | Write text into a component cell (deprecated) | β
| β
| β |
sendCellPhoto | Write a photo into a component cell (deprecated) | β
| β
| β |
sendCellVideo | Write a video into a component cell (deprecated) | β
| β
| β |
Signup management
Method | Purpose | Java | JavaScript | Python |
getWhitelistUsers | List whitelisted signups | β
| β
| β
|
addToWhitelist | Add signups to the whitelist | β
| β
| β
|
removeFromWhitelist | Remove signups from the whitelist | β
| β
| β
|
addWhitelistPatterns | Add whitelist patterns | β
| β
| β
|
removeWhitelistPatterns | Remove whitelist patterns | β
| β
| β
|
getBlacklistUsers | List blacklisted signups | β
| β
| β
|
addToBlacklist | Add signups to the blacklist | β
| β
| β
|
removeFromBlacklist | Remove signups from the blacklist | β
| β
| β
|
addBlacklistPatterns | Add blacklist patterns | β
| β
| β
|
removeBlacklistPatterns | Remove blacklist patterns | β
| β
| β
|
Commerce
Method | Purpose | Java | JavaScript | Python |
getProductItem | Retrieve a product | β
| β
| β
|
listCollections | List collections | β
| β
| β
|
getCollectionProduct | List products in a collection | β
| β
| β
|
submitPaymentResult | Report the outcome of an authorized payment | β
| β
| β
|
Media & storage
Method | Purpose | Java | JavaScript | Python |
generatePermanentUrl | Create a permanent URL for a media file | β
| β
| β
|
extensionSetDoc | Store a document record | β
| β
| β
|
extensionGetDoc | Retrieve a document record | β
| β
| β
|
extensionListDoc | List document records | β
| β
| β
|
extensionDeleteDoc | Delete a document record | β
| β
| β
|
Inbound events β Server β API
Implement the matching callback to receive these.
Connection
Event | Fires when | Java | JavaScript | Python |
TOKEN_AUTH_OK | Authentication succeeded | onConnect | onConnect | on_connect |
Messages
Event | Fires when | Java | JavaScript | Python |
message | A message is received | onReceive | onReceive | on_receive |
scheduledMessage | A scheduled message is received | onScheduleMessage | onScheduleMessage | on_schedule_message |
messageAck | A sent message is acknowledged | onMessagAckCallback | onMessagAckCallback | on_message_ack_callback |
Chatbot events
Event | Fires when | Java | JavaScript | Python |
userJoinedBot | A user joins the API | onUserJoinedBot | onUserJoinedBot | on_user_joined_bot |
userStartedBot | A user starts the API | userStartedBot | userStartedBot | user_started_bot |
userStoppedBot | A user stops the API | userStoppedBot | userStoppedBot | user_stopped_bot |
userLeftBot | A user leaves the API | userLeftBot | userLeftBot | user_left_bot |
WebhookEvent | An external system posts to the callback URL | onWebhookEvent | onWebhookEvent | on_webhook_event |
Menus
Event | Fires when | Java | JavaScript | Python |
menuCallback | A user submits any menu | onMenuCallBack | onMenuCallBack | on_menu_callback |
chatMenuCallback | A user interacts with a chat menu | onChatMenuCallBack | onChatMenuCallBack | on_chat_menu_callback |
inlineMessageCallback | A user presses an inline menu button | onInlineMessageCallback | onInlineMessageCallback | on_inline_message_callback |
inlineSearch | A user performs an inline search | onInlineSearh | onInlineSearch | on_inline_search |
workflowCell | A workflow cell is returned | onWorkflowDetails | onWorkflowDetails | on_workflow_details |
Chats & users
Event | Fires when | Java | JavaScript | Python |
chatDetails | Response to getChat / setChat | onChatDetails | onChatDetails | on_chat_details |
chatMember | Response to member operations | onChatMember | onChatMember | on_chat_member |
chatAdministrators | Response to getChatAdministrators | onChatAdministrators | onChatAdministrators | on_chat_administrators |
createChatAck | Response to createChat | onCreateChat | onCreateChat | on_create_chat |
userDetails | Response to getUser | onUserDetails | onUserDetails | on_user_details |
myProfile | Response to getMyProfiles / setMyProfile | onMyProfile | onMyProfile | on_my_profile |
Signup management
Event | Fires when | Java | JavaScript | Python |
whitelist Β· getWhitelistUsersResponse Β· addToWhitelist_ack | Whitelist retrieved or added to | onWhiteList | onWhiteList | on_white_list |
removeFromWhitelist_ack | Signups removed from the whitelist | onDeleteWhiteList | onDeleteWhiteList | on_remove_white_list |
addWhitelistPatterns_ack Β· removeWhitelistPatterns_ack | Whitelist patterns added or removed | onWhiteListPattern | onWhiteListPattern | on_white_list_pattern |
blacklist Β· addToBlacklist_ack | Blacklist retrieved or added to | onBlackList | onBlackList | on_black_list |
removeFromBlacklist_ack | Signups removed from the blacklist | onDeleteBlackList | onDeleteBlackList | on_remove_black_list |
addBlacklistPatterns_ack Β· removeBlacklistPatterns_ack | Blacklist patterns added or removed | onBlackListPattern | onBlackListPattern | on_black_list_pattern |
β οΈgetBlacklistUsersis answered with theblacklistmethod, notgetBlacklistUsersResponse. The whitelist equivalent does usegetWhitelistUsersResponse.
Commerce
Event | Fires when | Java | JavaScript | Python |
getProductItemResponse | Response to getProductItem | onProductDetail | onProductDetail | on_product_detail |
listCollectionsResponse | Response to listCollections | listCollectionItemResponse | listCollectionItemResponse | on_collection_item |
getCollectionProductResponse | Response to getCollectionProduct | onCollectionProduct | onCollectionProduct | on_collection_product |
paymentAuthorizationRequest | A payment needs authorizing by your API | onPaymentAuthorizationRequest | onPaymentAuthorizationRequest | on_payment_authorization_request |
Media & storage
Event | Fires when | Java | JavaScript | Python |
permanentUrl | Response to generatePermanentUrl | permanentUrl | permanentUrl | permanent_url |
extensionSetDocResponse Β· extensionGetDocResponse Β· extensionListDocResponse Β· extensionDeleteDocResponse | Response to an extension document operation | onExtensionDocResponse | onExtensionDocResponse | on_extension_doc_response |