POST /api/client/services/request/client/identity

Assigns the client identity, using a shared secret value. Uses HTTP POST. Generally used when setting up the shared secret value for the first time. Returns a one-time session token.

Authorization Roles/Permissions: Must be logged in. Must be an authorized user.

This topic includes the following sections:

HTTP Method

POST

URL

https://{hostname}/api/client/services/request/client/identity

Sample Request

The example below shows a sample request when app credentials are provided.

Sample Request URL

https://{hostname}/api/client/services/request/client/identity

Sample request headers

POST http://acmepaymentscorp.com/api/client/services/request/client/identity HTTP/1.0
Host: acmepaymentscorp.com
Accept: text/plain, */*; q=0.01
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body

With app credentials.

appsSelection=5OUtQCqGBGs8dulc9UC6vg82.acmepaymentscorp&apiKey=acmepaymentscorp-5OUtQCqGBGs8dulc9UC6vg82&apiSecret=2888bac046e6021a3a99f24051a8e5eb29270830&X-Csrf-Token_acmepaymentscorp=TokenID%253Dea06ce0a-c5f2-11e5-b708-e23f6b2a9732%252CexpirationTime%253D1454010080439%252CUserFDN%253D035820a4-806f-4001-af35-7a93ad9a2339%25252Eacmepaymentscorp%252Csig%253DXgBO_3C-c-nGYTZn_uqpTim4MQ3w91DQGXGfUZRxOhFs-0kvG967qoaXgLtfXfuybJ48GTYfSde66A77R1Uf8s80dtWZtztMJ-O2VicUhLh5dRLlme80XwBmG2N_-T-aSdPtC207kTKMAO2CUNERPdxh_NYKLKnLW6GySPImDl

Sample Request #2

The example below shows a sample request when the app is anonymous.

Sample Request URL

https://{hostname}/api/client/services/request/client/identity

Sample request headers

POST http://acmepaymentscorp.com/api/client/services/request/client/identity HTTP/1.0
Host: acmepaymentscorp.com
Accept: text/plain, */*; q=0.01
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...

Sample request body #2

Anonymous app.

appsSelection=anonymous

Request Headers

For general information on request header values, refer to HTTP Request Headers.

Header Description
Accept Any Accept header value that supports a response Content-Type of text/plain is valid; for example, */*.
Content-Type application/x-www-form-urlencoded
Cookie AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies.
X-Csrf-Token_{fedmemberID} The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login.

Request Parameters

The request content is the client identity information, as shown in the examples.

Response

If successful, this operation returns HTTP status code 200, with the requested information.

Sample Response

The sample response below shows successful completion of this operation.

Sample response headers

HTTP/1.1 200 OK
Date: Thu, 15 Oct 2015 18:24:51 GMT
Content-Type: text/plain

Sample response body #1

Response to sample request #1.

guid=10b92992-eb9f-4058-8511-4339bb330759&appsSelection=anonymous&signature_method=SharedSecret

Response Headers

For general information on response header values, refer to HTTP Response Headers.

Header Description
Content-Type text/plain

Response Body

The response body is a one-time session token that can be used for the next request.

Error Codes/Messages

If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.

Item Value
401 Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing.
500 An error occurred processing the call.

More information about Akana API Platform API error messages.