Get Access Token
post
/mobile/platform/lx/token
Retrieves an access token for connecting to the Live Experience client that's associated with the backend.
Permissions
The authorized user can be a social user, virtual user, or a mobile user. If the authorized user is a mobile user, then the user must have a role that's associated with the mobile backend.
Request
Query Parameters
-
client_type: string
The type of client. Only
LIVE_EXPERIENCE
clients are supported.
Response
Supported Media Types
- application/json
200 Response
Token was obtained successfully.
Root Schema : Live Experience Access Token
Type:
object
Title:
Live Experience Access Token
Live Experience access token and related information.
Show Source
-
access_token:
string
Base64-encoded access token for opening a Live Experience connection through the backend.
-
expires_in:
string
Number of seconds, starting from the time that the response was generated, before the access token expires.
-
id_token:
string
Base64-encoded JWT token.
-
token_type:
string
Allowed Values:
[ "Bearer" ]
Type of access token. This is alwaysBearer
.
Example Response (application/json)
{
"access_token":"eyJhbGc...H9yJhsA",
"id_token":"eyJhbGci...18GNCB2A",
"token_type":"Bearer",
"expires_in":"1200"
}
400 Response
Bad Request. Either the Live Experience credential information is invalid or Live Experience must be switched on in the backend Settings page.
Root Schema : Error
Type:
object
Title:
Error
The error JSON object returned by the service.
Show Source
-
detail:
string
Message that provides the error details.
-
o:ecid:
string
Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
-
o:errorCode:
string
The service's error code.
-
o:errorDetails(optional):
array o:errorDetails
Minimum Number of Items:
0
Included when the error is caused by multiple issues. -
o:errorPath:
string
The relative point in the API path where the error occurred.
-
status:
integer
HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Nested Schema : o:errorDetails
Type:
array
Minimum Number of Items:
0
Included when the error is caused by multiple issues.
Show Source
-
Array of:
object Error Detail
Title:
Error Detail
Nested Schema : Error Detail
Type:
object
Title:
Show Source
Error Detail
-
instance:
string
URI to the link that provides more detailed information about the error.
-
o:errorCode:
string
The service's error code.
-
o:errorPath:
string
The relative point in the API path where the error occurred.
-
title:
string
Summary of the problem.
-
type:
string
The URI to the link that provides details about the HTTP status code.
Example Response (application/json)
{
"o:errorCode":"MOBILE-28416",
"detail":"Bad Response from client. Check your connection properties",
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Bad Response from client",
"o:errorPath":"/mobile/platform/lx/token",
"o:ecid":"HqFoV1V0000000000, 0:1",
"status":400
}
Examples
Here's an example of using cURL to obtain a Live Experience access token.
curl -i \
-X POST \
-u user@example.com:password
-H 'Oracle-Mobile-Backend-ID: ABCD59b-f13c-4722-81b8-4e719b5a4622' \
http://fif.cloud.oracle.com/mobile/platform/lx/token?client_type=LIVE_EXPERIENCE
Example of Response Header
The following shows an example of the response header:
200 OK Content-Length: 1203 Content-Type: application/json Date: Fri, 06 Jul 2018 18:28:45 GMT
Example of Response Body
Here's an example of the response body in JSON format:
{
"access_token": "ABCDbGciOiJSUzI1NiJ9.eyJhdWQiOiJvcmFjbGVtY3MiLCJpc3MiOiJhdXRoMTYyZDg3ZjFiNzhtIiwiZXhwIjoxNTMwOTAyOTI3LCJzZXJ2ZXJfdmVyc2lvbiI6IjE4LjQuMSIsImlhdCI6MTUzMDkwMTcyNywidGVuYW50X3JvbGUiOlsiZ3Vlc3QiXSwidXNlcm5hbWUiOiIxcDhhcGVlazc5YnFjYzZxaXNpaiJ9.SpcRrkTNUpFfC6c6b0CBhaLUmUfL0YGiHPYCsHOWbc3bBmBRta3q2p1Zki0vT0y_lKdIb9EqNzAyxzH3cRbUNqlqeble31l566t0-yh886gJoVTu0W4zWAA2LM_EYSLtJcygX0k0ErjXJOQJ9LFM4jz60Y1n-0cNAKzdSPAJ6v4lIf1b1UODdbArIIcuQiC2bYUwbbtf_P57pdXcNuymTixk4_TDcmGbRlqxrOI-lZ7Tyx-YHPPwPDHZzk0O-9pJtt7wfG6MsLPM02ar1H7jTY35mLn0RTJ_LdBDjOQdIE8HSKlECAOndPXA48bwSFNHKGHc3YSUzTKv7h7_HHFRNQ",
"expires_in": "1200",
"id_token": "ABCD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