Updated on 2025-11-13 GMT+08:00

Interface for receiving and processing report messages sent by Gupshup

Function

This interface is invoked to receive and process report messages sent by Gupshup.

Usage Description

  • Prerequisites

    The WhatsApp channel configuration has been created and the service provider has been set to Gupshup.

  • For details, see the official document at https://docs.gupshup.io/docs/overview.

Interface Authentication

This authentication mode is used for WhatsApp access through the Gupshup integrator.

Instructions:

In the AICC, the webhook password is configured on the Channel Configuration page.

The request header Authorization is added to the request and the WhatsAppAdapter interface is invoked. The value of Authorization is the webhook password.

Request Header Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Default Value

Description

Content-Type

Yes

String

None

The value is fixed at application/json; charset=UTF-8.

Authorization

Yes

String

None

Webhook authentication password configured on the Channel Configuration page in the AICC.

Interface Prototype

Table 2 Interface prototype description

Method

POST

URL

https://IP address:Port number/social/on/whatsapp/{whatsAppBsp}/message/{channelId}

IP address:Port number indicates the IP address and port number of the NSLB exposed externally. {whatsAppBsp} indicates the integrator.

{channelId} indicates the channel ID.

Request Body Parameters

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

timestamp

Yes

long

Sending time of a message. The value is a Unix timestamp.

type

Yes

String

Message type: message-report.

payload

Yes

object

Message carrier. For details, see Table 4.

Table 4 Payload parameters

Parameter

Mandatory

Type

Description

gsId

Yes

String

Unique ID of a Gupshup message.

type

Yes

String

Message type: The options are delivered and read.

destination

Yes

String

Customer mobile number.

payload

Yes

object

Message content. For details, see Table 5.

Table 5 Payload parameters

Parameter

Mandatory

Type

Description

ts

Yes

Long

Time when a message is generated. The value is a Unix timestamp, in seconds.

Response Parameters

No response is returned when this interface is invoked.

Example

  • Request
    POST /social/on/whatsapp/gupshup/message/202105102694809992
    
    host: 10.10.10.2:18446
    connection: Keep-Alive
    x-forwarded-for: 10.10.10.3, 10.10.10.4
    x-real-ip: 10.10.10.5
    content-length: 401
    remote-host: 10.10.10.6
    user-agent: java/socket
    Authorization: *************
    content-type: application/json; charset=utf-8
    accept: */*
    
    {
      "timestamp" : 1743075951500,
      "type" : "message-event",
      "payload" :
      {
        "gsId" : "7d047a97-c5b8-4f13-82cb-f68068d1a33a",
        "type" : "read",
        "destination" : "8618******1",
        "payload" :
        {
          "ts" : 1743075950
        }
      }
    }