Skip to content

Message ID in chat#

A message ID is a unique combination of characters. It is assigned to incoming and outgoing messages and allows you to find a specific message in the chat. Example: F7AEC1B7086ECDC7E6E45923F5EDB825.

Important

You are NOT required to generate message ID manually. It is generated automatically by the system and returned by various Green-API methods.

Uniqueness#

The identifier is unique within a single chat. If one participant sends a message with the identifier 9DB14F14A253D33F4A9CD84123456789 to a group, any other participant in the group will be able to find this message using the same ID.
To generate a unique identifier by instance, use the combination of chatId and idMessage, for example 120363153000000000@g.us_9DB14F14A253D33F4A9CD84123456789.

How to get the identifier#

The identifier can be obtained when sending, through journal methods, or in the incoming notification in the idMessage field. Example of a response from the sendMessage method:

{
    "idMessage": "3EB0C767D097B7C7C030"
}