Use this API to send a reaction message to a WhatsApp user.
Reaction messages are emoji-reactions that you can apply to a previous WhatsApp user message that you have received.
Request Parameters
Key | Description | Values | Data Types | Required/Optional | Constraints |
---|---|---|---|---|---|
Authorization |
Access Token for the application |
{{PARTNER_APP_TOKEN}} |
String |
Required |
Should be a valid Partner App Access Token. |
APP ID |
App ID to fetch the access token |
|
String |
Required |
The Id should be a valid app Id of Gupshup |
messaging_product |
Messaging product |
String |
Required |
||
recipient_type |
Recipient type |
individual |
String |
Required |
|
to |
Destination phone no where the message need to be send |
|
String |
Required |
Must be a valid phone number. |
type |
Messaging type |
interactive |
String |
Required |
Type should be |
reaction |
Unicode escape sequence of the emoji, or the emoji itself, to apply to the user message. WhatsApp message ID of message you want to apply the emoji to. If the message you are reacting to is more than 30 days old, doesn't correspond to any message in the conversation, has been deleted, or is itself a reaction message, the reaction message will not be delivered and you will receive a messages webhook with error code |
|
Object |
Required |
Key should be |
Sample Request
curl --location 'https://partner.gupshup.io/partner/app/07c7c72d-20e3-4ff9-a5a1-14d1186eeec8/v3/message' \
--header 'Authorization: *******f30' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'messaging_product=whatsapp' \
--data-urlencode 'recipient_type=individual' \
--data-urlencode 'to=919028279638' \
--data-urlencode 'type=reaction' \
--data-urlencode 'reaction={"message_id": "wamid.HBgMOTE5MDI4Mjc5NjM4FQIAERgSODM4RUQxMTc4RjE5QjIzOEQ1AA==","emoji":"\uD83D\uDE04"}'
Sample Response
{
"messages": [
{
"id": "GUPSHUP_MESSAGE_ID"
}
],
"messaging_product": "whatsapp",
"contacts": [
{
"input": "DESTINATION_PHONE_NO",
"wa_id": "DESTINATION_PHONE_NO"
}
]
}
Status Codes
Status Code | Response | Comments |
---|---|---|
Success | ||
200 | { "messages": [ { "id": "GUPSHUP_MESSAGE_ID" } ], "messaging_product": "whatsapp", "contacts": [ { "input": "DESTINATION_PHONE_NO", "wa_id": "DESTINATION_PHONE_NO" } ] } | |
Error | ||
401 | { "status": "error", "message": "Authentication Failed" } | When API key authentication fails |
400 | { "message": "Callback Billing must be enabled for this API", "status": "error" } | If Callback billing is not enabled for the app |
400 | { "message": "Invalid App Details", "status": "error" } | If app details are not found |