From Bright Pattern Documentation
Jump to: navigation, search
This page contains changes which are not marked for translation.

• 5.2 • 5.3

Request SMS Chat Session

This function initiates an SMS session using a request from the 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.

Request

URI

https://<host>/clientweb/api/v1/requestsms?tenantUrl=<tenantUrl>

HTTP Method

POST

Authentication

Authorization: MOBILE-API-140-327-PLAIN appId="<Unique app identifier>", clientId="<Unique client ID>"

Parameters

Parameter Description
tenantUrl Specifies the tenant if the request is not sent to the tenant’s domain
appId Unique app identifier
clientID Unique client ID

Content-Type

application/json

User-Agent

MobileClient

Request Body Example

{
  “phone_number”: “4151234567”,
  “from”: “6504567891” 
  “parameters”: {
     “parameter1”: “value1”
      …
  }
}

Request Body Parameters

Parameter Data Type Description
phone_number number SMS number of the customer
from string The sender SMS number propagated into the $(item.from) scenario variable
parameters array List of expected parameters


Response

In response to a successful request, you will get a 200 OK. If there are errors, you will receive a 400 with error code and message from the SMS server.

Example Response

400 – Bad Request

{
"error_code": "5",
"error_message": “A message for you”
}

Response Codes

Code Description
400 Bad request
401 Unauthorized
200 Success

Error Codes

Errors Description
0 Success
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



< Previous | Next >