post
https://partner.gupshup.io/partner/app//v3/message
Use this API to send a reaction message to a WhatsApp user.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Reaction messages are emoji-reactions that you can apply to a previous WhatsApp user message that you have received.
Note:
- Use the
recipientparameter only when BSUID is enabled for the app.- When both
toandrecipientfields are used in the payload, thetofield gets the priority.
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. |
| appId | App ID to fetch the access token | {{APP_ID}} | 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 number where the message needs to be sent | 91785876xxxx | String | Required (Can be optional if BSUID is enabled for the app and recipient parameter is used instead) | Must be a valid phone number |
| recipient | Destination BSUID where the message needs to be sent | IN.461449821882xxxx | String | Optional | Must be a valid BSUID |
| type | Messaging type | reaction | String | Required | Type should be reaction to send reaction message. |
| 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 131009. | "reaction": { "message_id": "wamid.HBgLMTY0NjcwNDM1OTUVAgASGBQzQUZCMTY0MDc2MUYwNzBDNTY5MAA=", "emoji": "\uD83D\uDE00" } | Object | Required | Key should be reaction to send reaction message. |
Sample Request
curl --location --request POST 'https://qa-partner-api.gupshup.io/partner/app/bf9ee64c-3d4d-4ac4-8668-732e577007c4/v3/message' \
--header 'Authorization: sk_e45eb372979f48dead602b52483259be' \
--header 'Content-Type: application/json' \
--data-raw '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{WHATSAPP_USER_PHONE_NUMBER}}",
"recipient": "{{BSUID}}",
"type": "reaction",
"reaction": {
"message_id": "{{WHATSAPP_MESSAGE_ID}}",
"emoji": "{{EMOJI}}"
}
}'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 |