Get a key
Create one in your bot’s settings. It is shown once — we only keep a hashed copy. Each key belongs to exactly one chatbot and can only reach that bot’s conversations.Send a message
Response
Read history
Page through history withafter_seq. Every message has a seq number that only goes up, which makes it a safe bookmark.
Return messages with a
seq higher than this.Between 1 and 100. Numbers outside that range are pulled back in.
Response
seq you have seen and send it back as after_seq. When last_seq matches your bookmark, you are up to date.
Limits
Errors
A conversation that belongs to another bot returns
404, not 403. It looks the same as an id that does not exist — on purpose, so a key cannot be used to hunt for other bots’ conversations.Next
Edit a sent message
PATCH any bot message. No time limit.Attach a file
Upload it, then use the
file_id.
