Skip to content

Integration Commands#

List of Commands#

Command Usage Description
/help /help Command Help
/start /start Getting Started with the Bot
/me /me Current User Information (telegram chat_id, username, name)
/language [lang]
/lang [lang]
/language en
/lang ru
Change the bot language
(available languages ​​are ru and en)
/instance [idInstance] [apiTokenInstance] /instance 1101111111 abcdef123456789abcde Connect a GREEN-API instance
/resetInstance /resetInstance Disconnect the current instance from integration
/status
/getStateInstance
/status
/getStateInstance
Check instance status
(Instance ID, instance status, connected phone number, notification settings)
/setchat [chat_id] /setchat 123456798 Set up forwarding to another Telegram chat
/sendMessage [WhatsApp number] [text] /sendMessage 79876543210 Hello! Send a message to WhatsApp
/notifications [type] [on/off] /notifications all on
/notifications incoming on
/notifications outgoing off
/notifications status off
Notification Management:
- incoming - Incoming WhatsApp messages
- outgoing - Statuses of messages sent in WhatsApp
- status - Notifications about instance status changes

Command Usage Examples#

/instance Command#

Purpose:
Links a GREEN-API instance to a Telegram bot.

Request Example:

/instance 1101111111 abcdef123456789abcde

Response Example:

Successful Connection:

Instance successfully linked!   

Webhook automatically set. 

You can now receive and send messages via WhatsApp. 

Available commands:
• /status - instance status
• /resetInstance - change instance
• /help - help

Connection Error:

Invalid format. Use:
/instance 1101111111 abc123abc123abc123abc123abc123

Where:
• 1101111111 - idInstance
• abc123... - apiTokenInstance

idInstance and apiTokenInstance can be obtained in your GREEN-API console after creating the instance.


Command /me#

Purpose:
Get information about the current Telegram user.

Example request:

/me

Example bot response:

Your Information

Your Telegram ID: 123456789
Username: your_username
First Name: Jane

Message forwarding:
To this chat


/status or /getStateInstance command#

Purpose: Check the status of the linked instance.

Example Request:

/status

Example Bot Response:

Instance Authorized:

Instance Status:

• Instance ID: 1101111111
• Status: authorized
• Phone Number: 79876543210@c.us

• Incoming Messages: enabled
• Outgoing message statuses: enabled
• Instance Status: enabled

Use /resetInstance to change instance

Instance Not Authorized:

Instance Status:

• Instance ID: 1101111111
• Status: notAuthorized
• Phone Number: Not Specified

• Incoming Messages: disabled
• Outgoing message statuses: disabled
• Instance Status: disabled

Use /resetInstance to change instance

Instance not connected:

Instance not linked. Use /instance to link.

Step-by-step setup guide: /start


/setchat command#

Purpose: Sets up message forwarding to a specified chat/channel.

Example request:

/setchat -1001234567890

The - prefix indicates that this is a supergroup or channel. The chat_id can be found using the @userinfobot bot or from the /me command response (for private chats).

Please note!

The bot can only send messages to private chats with which it has already communicated. Therefore, when setting up message forwarding to another Telegram user, that user must initiate a conversation with the bot (by sending /start).

Example bot response:

Successful installation:

Settings updated!

All WhatsApp messages will now be forwarded to:
-1001234567890

To reset the settings and receive messages for yourself:
/resetchat

Installation error:

Failed to send message to the specified chat

Possible causes:
• Bot is not added to this chat/channel
• Invalid chat_id
• Сhat does not exist

Make sure:
1. Bot is added to the target chat/channel
2. Bot has permission to send messages
3. Сhat_id is correct


/sendMessage Command#

Purpose:
Send a message on WhatsApp.

Example request:

/sendMessage 79876543210 Hello! This is a test message from Telegram.

Example bot response:

Message sent to WhatsApp:

Chat: 79876543210@c.us
Text: Hello! This is a test message from Telegram
Message ID: BAE56B72848CD42F
Sending error:
Invalid format. Use:
/reply <phone_number> <message>

For example:
/reply 79876543210 Hello!


/notifications Command#

Purpose:
Manage WhatsApp event notifications.

Example requests:

Enable all notifications:

/notifications all on

Enable notifications for incoming messages:

/notifications incoming on

Disable notifications for outgoing message statuses:

/notifications outgoing off

Disable notifications for instance status changes:

/notifications status off

Notification types:

  • incoming - incoming WhatsApp messages
  • outgoing - statuses of sent messages
  • status - notifications about instance status changes
  • all - all notification types (incoming, outgoing, and status)

/language Command#

Purpose:
Selects the bot interface language.

Example request:

/language ru

Example bot response:

Successful language change:

Language changed to Russian

Error installing language:

This language is not supported.
Please send /language ru or /language en