We are sunsetting On-Premises API. Refer to our On-Premises API Sunset document for details, and to learn how to migrate to our next-generation Cloud API.
/v1/contacts/{users-whatsapp-id}/identity
It is possible to receive notifications from WhatsApp when a user you are communicating with has potentially changed. Use this /v1/contacts edge to manage users' identities. See Understanding Identity Change for WhatsApp Business for more information.
For more information about the system notification sent from WhatsApp see Inbound System Messages — Example: A User Potentially Changed. The response to the system notification is managed by your business.
A GET
call to this endpoint retrieves the latest identity hash for a user.
Request:
GET /v1/contacts/users-whatsapp-id/identity
If successful, your request returns 200 OK
and a message body containing a contacts
object. For example, the complete response, including the contacts
object, might look like this:
{ "contacts": { "hash": "UKD6Y/5SqDU=", "created_timestamp": 1600132094000, "acknowledged": true } }
The contacts
response object contains the following information about the user’s identity.
Name | Description |
---|---|
type: String | State of acknowledgment for latest |
type: Int | Timestamp of when the WhatsApp Business API client detected the user potentially changed. |
type: String | Identifier for the latest |
Use PUT
calls to this endpoint to acknowledge the latest user_identity_changed
system notification.
Until you make a successful identity
API call after receiving a user_identity_changed
notification, all outgoing messages to this user will be blocked if the show_security_notifications
settings is enabled in the application settings.
Request:
PUT /v1/contacts/users-whatsapp-id/identity { “hash”: “Rc/eg9RQ0JA=” }
A successful response is 200 OK
with a null
or {}
message body.
Name | Description |
---|---|
type: String | Identifier of the latest |