Kaleyra SMS Integration with CleverTap

POST and GET Methods

To integrate SMS with CleverTap, perform the following steps:

  1. In the CleverTap Dashboard, navigate to Settings and then select SMS (Integrate your SMS provider).
  1. Select the Other (generic) option from the SMS Service Provider list.
  1. Enter the name of the provider as Kaleyra. Select the Mark as default option to set Kaleyra as your provider.

POST Method

  1. Select the POST method for Kaleyra SMS integration.

  2. Select the Authentication tab and add the HTTP API endpoint as in the example URL.

📘

Example URL:

https://api.kaleyra.io/v1/SID/messages

  1. Add the SID (Security Identifier) in the above request from your Kaleyra account. For more information on generating an API key, see Generating an API Key.

  2. Select the Headers tab to add the following keys and their corresponding values.

Key

Value

api-key

Ac4XXXXX21f

Content-Type

application/x-www-form-urlencoded

  1. Select the Parameters tab to add the following keys and their corresponding values. Select the content type as form-urlencoded.

Key

Value

to

$$To

Sender

KXXXXA

body

$$Body

source

CleverTap

type

Indian Customer - Use one of the following:
OTP, MKT, or TXN.
Non-Indian Customers - Use Default.

template_id (India only - Optional)

2xxxxxxxxxxxx

  1. Use the "$$To" and "$$Body" parameters in the API endpoint to denote the user’s mobile number and SMS messages. These values will be replaced with actual values when the message is delivered to the endpoint. Both $$To and the $$Body parameters are case-sensitive.

  2. Use the Send a test SMS option to ensure the configuration is working as expected. For customers in India, ensure you register the message content with DLT (India Telecom Regulations).

GET Method

  1. Select the GET method for Kaleyra SMS integration.

📘

Note:

For the GET method, the body should always be URL encoded.

  1. Select the Authentication tab and add the HTTP API endpoint as in the example URL.

📘

Example URL:

https://api.in.kaleyra.io/v1/{{SID}}/messages? to=$$to&body=$$body&type=MKT&sender=KXXXXX

  1. Select the Headers tab to add the following keys and their corresponding values.

Key

Value

api-key

Ac4XXXXX21f

Content-Type

application/x-www-form-urlencoded

  1. Select the Parameters tab to add the following keys and their corresponding values. Select the content type as form-urlencoded.

Key

Value

SID

Generating an API key

Sender ID

Creating Sender ID

Type

(Indian Customer - OTP/MKT/TXN; Non-Indian Customers - Default)

  1. Use the "$$To" and "$$Body" parameters in the API endpoint to denote the user’s mobile number and SMS messages. These values will be replaced with actual values when the message is delivered to the endpoint. Both $$To and the $$Body parameters are case-sensitive.

  2. Select the No Authentication option from the Type list.

  3. Use the Send a test SMS option to ensure the configuration is working as expected. For customers in India, ensure you register the message content with DLT (India Telecom Regulations).


Did this page help you?