8x8 is a cloud communications platform providing integrated voice, video, chat, and contact center solutions for businesses to connect and collaborate effectively.

Welcome to the 8x8 documentation for Dashbot! Integrating Dashbot into your 8x8 application is quick and easy.

Obtain 8x8 API Key

To manage API access keys, a user first needs access to this permission through Roles and Permissions.

This permission is enabled for users of the default Company Admin Role or a custom role can be created for specific users using the application: 8x8 Admin Console and the permission: Application Credentials.

From the menu, go to API Keys & click Create App
Select the API/s from the list of available APIs and save the app. This action will automatically generate the API key.

To fetch the API key for the app go to the list of apps listed under the API Keys.
Select to edit the app you just created.
Note that the API key and the secret code are now visible in the protective mode.
View the key and the code and copy and store the key for authentication.

To manage API access keys, a user first needs access to this permission through Roles and Permissions.

This permission is enabled for users of the default Company Admin Role or a custom role can be created for specific users using the application: 8x8 Admin Console and the permission: Application Credentials.

Accessing Data from 8x8 Endpoints

We will focus on two endpoints under their reporting API:

Retrieve message details

Endpoint: https://chatapps.8x8.com/api/v1/subaccounts/{subAccountId}/messages/{umid}

Example GET request:

curl --request GET \
     --url https://chatapps.8x8.com/api/v1/subaccounts/subAccountId/messages/umid \
     --header 'accept: application/json'

Retrieve SMS details

Endpoint: https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages/{umid}

Example GET request:

curl --request GET \
     --url https://sms.8x8.com/api/v1/subaccounts/subAccountId/messages/umid \
     --header 'accept: application/json'

POST responses to Dashbot

When your survey receives a response, post the data to the following endpoint:

https://tracker.dashbot.io/track?platform=universal&v=10.1.1-rest&type=incoming&apiKey=API_KEY_HERE

Make sure to set the ‘Content-Type’ header to ‘application/json’ and to replace API_KEY_HERE with your api key.

You must send the data with the following fields:

  • text – string – (required)
  • userId – string – (required) – should be the SAME userId for both incoming and outgoing messages this is NOT the bot’s user ID

To review all optional fields see our API reference.

The data to POST should pass the following data:

{
  "text": "Hi, bot",
  "userId": "+14155551234",
  "platformJson": {
    "whateverJson": "any JSON specific to your platform can be stored here"
  }
}

Sample cURL

curl -X POST -H "Content-Type: application/json"
     -d '{"text":"Hi, bot","userId":"+14155551234","platformJson":{"whateverJson":"any JSON specific to your platform can be stored here"}}'
     'https://tracker.dashbot.io/track?platform=sms&v=11.1.0-rest&type=incoming&apiKey=API_KEY'

Notice, you must replace the placeholder API_KEY_HERE above with your api key.