logo

API REFERENCE β€” ALL METHODS & CALLBACKS

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
⚠️ getBlacklistUsers is answered with the blacklist method, not getBlacklistUsersResponse. The whitelist equivalent does use getWhitelistUsersResponse.

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