# Sinch Conversation API

The [Sinch Conversation API](https://www.sinch.com/products/apis/messaging/conversation-api/) allows you to connect Chatlayer.ai to multiple channels at the same time, without any additional configuration. The Sinch Conversation API currently supports:

* SMS
* MMS
* RCS
* Viber
* Facebook Messenger
* WhatsApp
* Telegram
* Instagram
* LINE
* KakaoTalk
* WeChat

You don't have to think about which type of message works with which channel – the Conversation API transcodes the messages automatically to match the target channel. Easy peasy!&#x20;

## Creating your channels

First, you need to create channels in the [Sinch dashboard](https://dashboard.sinch.com/). Depending on the channel you want to set-up, the instructions will be different.

## Linking the channels to the Conversation API app

You can find detailed instructions on how to create a Conversation API app [here](https://developers.sinch.com/docs/conversation-getting-started).

{% hint style="warning" %}
Make sure that the region of your app is the same one of your Chatlayer account. If you don't know which region you are using, you cand find that out [here](https://docs.chatlayer.ai/support/saas-regions-and-ip-ranges) by the URL you access our platform.
{% endhint %}

<figure><img src="/files/-MN4jaChh65k8SclCKob" alt=""><figcaption></figcaption></figure>

## Setting up the Conversation API integration in Chatlayer

![](/files/-MIZLjjNOU90mPgEZuf9)

In the Channels page on our platform, add a new channel that is activated through the Sinch Conversation API.&#x20;

![](/files/-MCvfqKVfBPC5dlSMIo7)

We'll then ask for a number of fields that are required to set up this connection. Let's go through each of them, one by one.

#### Project ID

You can find the project ID in the [conversation API overview](https://dashboard.sinch.com/convapi/overview).

![](/files/-MCvgM6yFIlYnVfM30-5)

#### App ID

After creating an App, you can view the App ID in the App table.

![](/files/-MCvgXwWo2_Eek95dKcq)

#### Client ID & client secret

To get a client ID and client secret, you need to create an access token. Navigate to [this page](https://dashboard.sinch.com/settings/access-keys) to start the process.

Click on 'New Key' and enter an access key display name:

![](/files/-MCvgnftEZ5HSuL7BTVO)

After confirming, you will be able to copy the client id and client secret to our platform:

![](/files/-MCvh7CN7px2z5iWCCvF)

Once you've entered all the information in the Chatlayer.ai channel window, click 'Create' and all the channels that are configured in the Sinch Conversation API app will be automatically added to Chatlayer.ai as well.

## Variables

If multiple channels are connected to your Conversation API app, it can be useful to be able to send a specific flow depending on the channel the bot user is on. To do that, you can use the `internal.sinchConversationAPI.channelIdentifier` [variable](/~/changes/zWOY8fNiBBrqneKkuGvA/bot-answers/settings/secure-variables-gdpr.md).&#x20;

The possible values for the channel are:

```
internal.sinchConversationAPI.channelIdentifier: 
"CHANNEL_UNSPECIFIED"
"WHATSAPP"
"RCS"
"SMS"
"MESSENGER"
"VIBER"
"VIBERBM"
"MMS"
"TELEGRAM"
"LINE"
"INSTAGRAM"
```

Furthermore, there are a few other variables that store data coming from the Sinch Conversation API that might be useful to guide your flow:

```
internal.sinchConversationAPI.channelIdentity: 'USER_PHONE_NUMBER_OR_ID',
internal.sinchConversationAPI.contactId: 'CONTACT_ID_CONV_API',
internal.sinchConversationAPI.appId: 'APP_ID_CONV_API',
internal.sinchConversationAPI.conversationId: 'CONVERSATION_ID_CONV_API',
internal.sinchConversationAPI.metadata: string or key + value pair
```

You can learn more about how to use variables to guide your flow here:

{% content-ref url="/pages/-LLTwJA9WiK4ksc3r6ZI" %}
[5. Flow navigation with variables](/~/changes/zWOY8fNiBBrqneKkuGvA/tutorials/tutorial-your-first-bot/tutorial-conditional-flow-navigation.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatlayer.ai/~/changes/zWOY8fNiBBrqneKkuGvA/channels/sinch-conversation-api-beta.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
