4 minutes, 56 seconds

How to configure an SMS API with Cloud Contact AI

An SMS API enables you to send text messages via an SMS gateway. In just a couple minutes and after implementing a few lines of code, you can begin sending SMS messages with our API.

1. After you’ve signed up and provisioned a phone with with Cloud Contact AI, your account will have a client id and client secret that you will need to make use of to invoke the API.

You can find this client id and client secret by navigating to the Settings menu item on the left hand navigation bar of your Cloud Contact AI account.

CCAI Account

2. Next, you’ll click on the Security tab of the Settings view to see your Client ID and API Key. To copy the API Key, click on the “Copy Api Key” button.

SMS API Key

3. Paste your API key into a text editor to reference later.

Now navigate to our API documentation page here. Then, click on the Authorize button to enter your API Key.

Swapper API

4. When you click on the Authorize button, you’ll be presented with the Available authorizations dialog.

Available authorizations

5. In the Value edit field. type Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtYXJrZXRpbmdAbGV0c3BsYXlzb2NjZXIuY29tIiwiaXNzIjoiY2xvdWRjb250YWN0IiwibmJmIjoxNjExM.

The API key will need to be your API Key. The one above will not work.

Next, you’ll want to click on the “Authorize” button.

Bearer

6. When you click on the “Authorize” button, you’ll then want to hit the “Close” button.

API Key

7. Now, click on the campaign-controllers menu item to expand the available methods. You should see the following screen

Cloud Contact AI Backend

8. Click on the “Try It Out” button, to enable the ID textfield. Enter your Client ID that you acquired from the Security Settings tab of Cloud Contact AI. Specify the correct Client ID. In our case, it’s 82

Hit the execute button, and you should see a valid curl command and a response code of 200.

API Integration

9. Now, scroll back up to the Campaign Direct api request, click the “Try It Out” button again.

API Request

10. Enter your Client ID, and the phone number that you want to send the text to.

SMS API Configuration

You’ve launched your first SMS with the default campaign via the Cloud Contact AI SMS API!

Was this article helpful?