From Bright Pattern Documentation
< 3.14:Mobile-web-api-specification
Revision as of 00:38, 7 March 2017 by Tracy (talk | contribs) (Request SMS Chat Session)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 3.14 • 3.15 • 3.16 • 3.17 • 3.18

Request SMS Chat Session

Description 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}
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 - This 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.


< Previous | Next >
< Previous | Next >