Skip to content

0.2 | Client Bot API

Liu Yuxuan edited this page Dec 11, 2021 · 1 revision

GET /bot/message

Get an initial welcome message. This request should be made when the user enters the app, so that the options are fetched and the bot can continue working.

return: A welcome Message and its reply options.

POST /bot/message

Get the next message when the user chooses a reply.

body: The chosen reply. Optionally, send the history of reply selection as an array of reply ids, sorted by time of selection. { _id: id, history (optional): [ reply_id ] }

return: The corresponding next Message and its reply options.

Clone this wiki locally