From Bright Pattern Documentation
Jump to: navigation, search
(Created new topic from branched topic Documentation:ServicePattern:mobile-web-api-specification:GeneralInformation:3.15)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<translate>= General Information=
 
<translate>= General Information=
ServicePattern Mobile/Web API is a RESTful API. The following is an example of an API request:
+
The Bright Pattern Mobile/Web API is a RESTful API. The following is an example of an API request:
  
<blockquote>URL: http://localhost:98/clientweb/api/v1/chats?tenantUrl=example.com
+
URL: http://localhost/clientweb/api/v1/chats?tenantUrl=example.com
 +
Method: POST
 +
 +
Authorization: MOBILE-API-140-327-PLAIN appId="test", clientId="123"
 +
Content-Type: application/json; charset=UTF-8
 +
User-Agent: MobileClient
 +
 +
{"phone_number":"3001","parameters": {"first_name":"John","last_name":"Lee"}}
  
Method: POST
 
 
Authorization: MOBILE-API-140-327-PLAIN appId=&quot;test&quot;, clientId=&quot;123&quot;
 
 
Content-Type: application/json; charset=UTF-8
 
 
User-Agent: MobileClient
 
 
{&quot;phone_number&quot;:&quot;3001&quot;,&quot;parameters&quot;:{&quot;first_name&quot;:&quot;John&quot;,&quot;last_name&quot;:&quot;Lee&quot;}}
 
</blockquote>
 
 
 
The TLS protocol can be used to ensure security of the data passed between Bright Pattern Contact Center and the customer-facing mobile/web applications. For secure communication, the above URL should be modified as follows: https://localhost:9443/clientweb/api/v1/chats?tenantUrl=example.com
 
  
 +
The TLS protocol can be used to ensure security of the data passed between Bright Pattern Contact Center and the customer-facing mobile/web applications. For secure communication, the above URL should be modified as follows:
 +
https://localhost/clientweb/api/v1/chats?tenantUrl=example.com
  
 
== Client Authentication Elements ==
 
== Client Authentication Elements ==
 
The following elements are used for client authentication and must be specified in every client request:
 
The following elements are used for client authentication and must be specified in every client request:
  
* ''Tenant URL'' - Identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login.
+
=== Tenant URL ===
 
+
''Tenant URL'' identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login.
* ''appId'' - The unique identifier of the [[contact-center-administrator-guide/MobileandWeb|Mobile/Web scenario entry]] that will be used to associate your application with a specific [[contact-center-administrator-guide/ScenariosOverview|scenario]].  
 
  
* ''clientId'' - A unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application in the UUID format. If clientId is set to ''WebChat'', HTTP cookies will be used for client identification.
+
=== appId ===
 +
''appId'' is the unique identifier of the [[contact-center-administrator-guide/Messaging|Messaging/Chat scenario entry]] that will be used to associate your application with a specific [[contact-center-administrator-guide/ScenariosOverview|scenario]].  
  
* ''User-Agent'' specifies the type of client interface. For web applications, it is determined by the browser type. For mobile applications, this parameter shall always be set to ''MobileClient''.
+
=== clientId ===
 +
''clientId'' is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application in the UUID format. If clientId is set to ''WebChat'', HTTP cookies will be used for client identification.
  
 +
=== User-Agent ===
 +
''User-Agent'' specifies the type of client interface. For web applications, it is determined by the browser type. For mobile applications, this parameter shall always be set to ''MobileClient''.
  
 
== Additional Information ==
 
== Additional Information ==
Line 39: Line 38:
  
  
<center>[[mobile-web-api-specification/SampleApplications|< Previous]]  |  [[mobile-web-api-specification/CheckAvailability|Next >]]</center>
+
 
 
</translate>
 
</translate>

Latest revision as of 23:10, 2 October 2018

• 3.10 • 3.11 • 3.12 • 3.13 • 3.14 • 3.15 • 3.16 • 3.17 • 3.18

General Information

The Bright Pattern Mobile/Web API is a RESTful API. The following is an example of an API request:

URL: http://localhost/clientweb/api/v1/chats?tenantUrl=example.com
Method: POST

Authorization: MOBILE-API-140-327-PLAIN appId="test", clientId="123"
Content-Type: application/json; charset=UTF-8
User-Agent: MobileClient

{"phone_number":"3001","parameters": {"first_name":"John","last_name":"Lee"}}


The TLS protocol can be used to ensure security of the data passed between Bright Pattern Contact Center and the customer-facing mobile/web applications. For secure communication, the above URL should be modified as follows:

https://localhost/clientweb/api/v1/chats?tenantUrl=example.com

Client Authentication Elements

The following elements are used for client authentication and must be specified in every client request:

Tenant URL

Tenant URL identifies your contact center. It corresponds to the domain name of your contact center that you see in the upper right corner of the Contact Center Administrator application after login.

appId

appId is the unique identifier of the Messaging/Chat scenario entry that will be used to associate your application with a specific scenario.

clientId

clientId is the unique identifier of the client application. It is used to identify communication sessions of a particular instance of the mobile application (i.e., of a specific mobile device). It must be generated by the mobile application in the UUID format. If clientId is set to WebChat, HTTP cookies will be used for client identification.

User-Agent

User-Agent specifies the type of client interface. For web applications, it is determined by the browser type. For mobile applications, this parameter shall always be set to MobileClient.

Additional Information

Standard HTTP response codes whose meaning conforms to the original specification (RFC 2616) are not discussed in this document. For specification of such responses, see section 10 of http://www.ietf.org/rfc/rfc2616.txt. This document only specifies the response codes whose description deviates from the original specification (e.g., is defined more narrowly or has a different meaning).

Note that a client application can only have one active communication session at a time.



< Previous | Next >