OpenDedicatedSession (Application-Level)
This method helps to create a unique id and associate this new identifier with the session to have a dedicated session for the subsequent API calls.
Authentication
This method requires an authentication token regardless of the access level of the application.
Request
Target Endpoint
POST /Api/Applications/OpenDedicatedSession
Parameters
Property Name |
Type |
Is Required? |
Description |
---|---|---|---|
ApplicationKey | String | Required | The application key, corresponding to your specific web service application. This constitutes the identifier for the requested resource. |
Request Sample
Headers
POST /Api/Applications/OpenDedicatedSession HTTP/1.1 Authorization: Bearer Do3l_2l3uLdmYX76u-BufLzuuhFPOE-nRZDyU0adiFk1 Content-Type: application/json Host: dev7.pagos.com
Body (formatted)
{ "ApplicationKey": "a4dcfb4f0464453b928ce1d6bcfb6aa3" }
Response
Property Name |
Type |
Description |
---|---|---|
Success | Boolean | Indicated whether or not the request was successful in generating a dedicated session based on the provided token and application key. |
SessionId | String | If the request was successful, GUID string assigned to the dedicated session. |
InvalidToken | Boolean | If the request is unsuccessful, indicates whether or not the failure was due to token. |
Messages | Array of String | A list of messages, which can be used or captured for diagnostics. When requests are unsuccessful, the reason for the failure will be documented in the Messages list. |
Response Sample (Success)
Headers
HTTP/1.1 200 OK Cache-Control: no-cache, no-store Content-Type: application/json; charset=utf-8
Body (formatted)
{ "SessionId": "25eae3ae-755e-4b3c-aa48-d7f096f6a2a7", "Success": true, "Messages": [] }
Response Sample (Failure)
Headers
HTTP/1.1 200 OK Cache-Control: no-cache, no-store Content-Type: application/json; charset=utf-8
Body (formatted)
Example 1:
{ "SessionId": "00000000-0000-0000-0000-000000000000", "Success": false, "InvalidToken": true, "Messages": [ "The requested resource is restricted and your request did not provide a valid token." ] }
Example 2:
{ "SessionId": "00000000-0000-0000-0000-000000000000", "Success": false, "InvalidToken": false, "Messages": [ "The requested application is invalid." ] }