Chat and correspondent Id#
В Green API supports two types of chats - personal chat and group chat. A personal chat is used to send personal messages to the recipient. Group chat is used to organize communication of several participants in a group. To work with group chats, the Green API provides relevant methods. Before sending a message to a personal or group chat, you need to get a chat Id.
Correspondent Id is used to identify the recipient in outgoing messages and to identify the sender in incoming messages, as well as in any other API methods that require a correspondent to be identified. The format of the correspondent Id is the same as the Personal chat Id.
The format of the personal chat Id is formed according to the template
firstname.lastname@example.org, where it is required to use the recipient's phone number instead of zeros
00000000000. The telephone number must be entered in full, with the country code and without spaces. Example:
Group chat Id presents a string of
XXXXXXXXXXXXXXXXX@g.us form. Example:
Group chat Id may be received by various Green API methods, for example:
- Create group
- Get outgoing messages journal
- Get incoming messages journal
- Incoming message: Text
You are NOT required to generate Group chat Id manually. It is generated automatically by the system and returned by various Green API methods.