Skip to content

getMyCommands

Get the Bot's command list.

Request

POST /:token/getmycommands

Parameters

ParameterTypeRequiredDescription
scopeBotCommandScopeNoScope of the commands, defaults to all chats
language_codeStringNoIETF language code for retrieving a language-specific command list

Response

Returns an array of BotCommand objects.

json
{
  "ok": true,
  "result": [
    {
      "command": "start",
      "description": "Start the bot"
    },
    {
      "command": "help",
      "description": "Get help information"
    },
    {
      "command": "settings",
      "description": "Change settings"
    }
  ]
}

BotCommand Fields

FieldTypeDescription
commandStringCommand text
descriptionStringCommand description

Error Codes

CodeDescription
400Bad request parameters
401Invalid or expired token
500Internal server error