Posted onEdited onInTelegramViews: Disqus: Symbols count in article: 646Reading time ≈1 mins.
關於TelegramBot收到相關ErrorResponse
400
1 2 3
Response:{"ok":false,"error_code":400,"description":"Bad Request: message is too long"} --------------------------------------------------------------------------------------- Soultion:依照Telegram API文件,一則訊息的上限是4096bytes
429
1 2 3 4 5
Response:{"ok":false,"error_code":429,"description":"Too Many Requests: retry after 899","parameters":{"retry_after":899}}
Soultion: 1.When sending messages inside a particular chat, avoid sending more than one message per second. 2.The API will not allow more than 30 messages per second or so.