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

Receiving and Processing MO Messages Sent on Infobip

Function

This interface is invoked to receive and process MO messages sent on Infobip.

Usage Description

  • Prerequisites

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

  • For details, see the official document at https://www.infobip.com/docs.

Interface Authentication

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

Instructions:

In the AICC, configure the webhook password in the channel configuration.

The WhatsAppAdapter interface is invoked to add the request header AccountKey to the request. The value of AccountKey is the webhook password.

Request Header Parameters

Table 1 Request header parameters

Parameter

Mandatory or Not

Type

Default Value

Description

Content-Type

Yes

String

None

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

AccountKey

Yes

String

None

Webhook authentication password configured in the channel configuration 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 parameter

Parameter

Mandatory or Not

Type

Description

results

Yes

Array[]

User message list. For details, see Table 4.

Table 4 results parameters

Parameter

Mandatory or Not

Type

Description

from

Yes

String

User ID.

to

Yes

String

Channel ID.

integrationType

Yes

String

Social media type. The default value is WHATSAPP.

messageId

Yes

String

Unique code of a user message.

message

Yes

JSON object

Specific message. For details, see Table 5.

contact

No

JSON object

Table 7

Table 5 message parameters

Parameter

Mandatory or Not

Type

Description

type

Yes

String

Message type. The value can be text, audio, image, video, or locate.

context

No

JSON object

Message reference. For details, see Table 6.

text

No

String

Text message content. This parameter is available when the message type is text.

url

No

String

Multimedia message. This parameter is available when the message type is audio, video, or image.

caption

No

String

Title of a multimedia message.

address

No

String

Address.

name

No

String

Location name.

latitude

No

BigDecimal

Longitude. This parameter is available when the message type is locate.

longitude

No

BigDecimal

Latitude. This parameter is available when the message type is locate.

Table 6 context parameters

Parameter

Mandatory or Not

Type

Description

id

Yes

String

ID of the referenced message.

from

Yes

String

Referenced party.

Table 7 contact parameters

Parameter

Mandatory or Not

Type

Description

name

Yes

String

User nickname.

Response Parameters

No response is returned when this interface is invoked.

Example

  • Request
    POST /social/on/whatsapp/infobip/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
    accountkey: *************
    content-type: application/json; charset=utf-8
    cookie: JSESSION*****#*#*****3
    accept: */*
    {"results":[{"from":"861332442355124","to":"447860099299","integrationType":"WHATSAPP","messageId":"ABGHhhMAdBiDLwIQZRJwPq_Gp8cmkj25SvpCDw","message":{"text":"HUAWEI","type":"TEXT"},"contact":{"name":"soebing2021"}}]}