Skip to content

Get Channel Profile

Request

Get user profile from a specific channel. Only supported on MESSENGER, INSTAGRAM, VIBER and LINE channels. Note that, in order to retrieve a WhatsApp display name, you can use the Get a Contact or List Contacts operations, which will populate the display_name field of each returned contact with the WhatsApp display name (if the name is already stored on the server and the display_name field has not been overwritten by the user).

Security
Basic or oAuth2
Path
project_idstringrequired

The unique ID of the project. You can find this on the Sinch Dashboard.

Bodyapplication/jsonrequired
app_idstringrequired

The ID of the app.

Example:"{APP_ID}"
recipientChannel Identities (object) or Contact ID (object)(Recipient)required
One of:

Identifies the recipient.

channelstring(Channel Identifier)required

The channel. Must be one of the supported channels for this operation.

Enum ValueDescription
MESSENGER

The Facebook Messenger channel.

INSTAGRAM

The Instagram channel.

VIBER

The Viber Bot channel.

LINE

The LINE channel.

Example:"MESSENGER"
curl -i -X POST \
  -u '<username>:<password>' \
  'https://us.conversation.api.sinch.com/v1/projects/{project_id}/contacts:getChannelProfile' \
  -H 'Content-Type: application/json' \
  -d '{
    "app_id": "{APP_ID}",
    "recipient": {
      "identified_by": {
        "channel_identities": [
          {
            "channel": "WHATSAPP",
            "identity": "string"
          }
        ]
      }
    },
    "channel": "MESSENGER"
  }'

Responses

A successful response.

Bodyapplication/json
profile_namestring

The profile name.

Example:"John Doe"
Response
{ "profile_name": "John Doe" }