POST /setGameScore
Use this method to set the score of the specified user in a game. On success, if the message was sent by the bot, returns the edited Message, otherwise returns True. Returns an error, if the new score is not greater than the user's current score in the chat and force is False.
Servers
- https://api.telegram.org/bot{token}
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
disable_edit_message |
Boolean | No |
Pass True, if the game message should not be automatically edited to include the current scoreboard |
force |
Boolean | No |
Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters |
message_id |
Integer | No |
Required if inline_message_id is not specified. Identifier of the sent message |
inline_message_id |
String | No |
Required if chat_id and message_id are not specified. Identifier of the inline message |
score |
Integer | Yes |
New score, must be non-negative |
chat_id |
Integer | No |
Required if inline_message_id is not specified. Unique identifier for the target chat |
user_id |
Integer | Yes |
User identifier |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.