From Bright Pattern Documentation
Contents
- Introduction
- API Methods
- General Information
- Check Availability
- Expected Parameters
- Request Chat
- 1 Request SMS Chat Session
- Get Active Chat
- Send Events
- Get Chat History
- Get New Chat Events
- Upload File
- Get File
- Get Agent Profile Photo
- API Events
Mobile/Web API Specification
Request SMS Chat Session
This function initiates an SMS session using a request from mobile API. The API method passes the SMS phone number with which to initiate the SMS session, which starts an SMS scenario as if an empty message was received from that SMS number.
URI
https://{host:port}/clientweb/api/v1/requestsms?tenantUrl={tenantUrl}
HTTP Method
POST
Authentication
Authorization: MOBILE-API-140-327-PLAIN appId="<Unique app identifier>", clientId="<Unique client ID>"
Content type
application/json
User-Agent
MobileClient
Parameters
tenantUrl - Specifies the tenant if the request is sent not to the tenant’s domain
Body
{
“phone_number”: “sms number of the customer”, “from”: “Propagated into $(item.from) scenario variable” “parameters”: { //list of expected parameters “parameter1”: “value1” … } } |
Response
400 – Bad Request
{
“error_code”: <error code>, “error_message”: “<error message>” } |
401 – Unauthorized
200 – application/json
{
"sms_error_code": <error code from SMS server, 0=success>, "error_message": “<error message if any>” } |
Errors
- 5 - Invalid access number. No SMPP gateway could be found for this access number.
- 6 - Cannot establish connection to database
- 10 - SMS Server command timeout
- 11 - Unable to create session. Customer-initiated session already exists for the same customer and access number.
- 21 - Invalid launch point ID