Token API

Use the Token API to request a JSON Web Token (JWT) from the CA solution. After receiving the token, set it as the value of the Authorization header for other APIs that you call. The CA solution will respond to those API calls only after validating the token. In other words, the CA solution will not respond to an API call if a valid token is not presented.
cairis2012saas
Use the Token API to request a JSON Web Token (JWT) from the CA solution. After receiving the token, set it as the value of the Authorization header for other APIs that you call. The CA solution will respond to those API calls only after validating the token. In other words, the CA solution will not respond to an API call if a valid token is not presented.
The token is assigned to the service account that is created in the CA solution for the enterprise. The token has an expiry time in minutes.
Endpoint
/token
Method
POST
This page is divided into the following topics:
Token - Headers
Header
Description
Content-Type
OPTIONAL
.
application/json
CA_com_apiVersion
OPTIONAL
.
Current version of this API.
The value is the following:
1.0
Token - Request Parameters
Parameter
Description
client_txn_id
REQUIRED.
Transaction ID generated by the enterprise’s calling application to uniquely identify this API call.
If required, the value can be used for debugging purposes.
UUID.
client_app_id
REQUIRED.
Calling application’s ID.
The CA solution uses this value to distinguish between apps that call this API.
If required, the value can be used for debugging purposes.
For example, if this API call is coming from the Operations application of Hedmoral Bank, then the value can be HEDMORAL_OPS.
Note:
The value of client_app_id must be the same for all API calls that are sent from this application.
username
REQUIRED.
Username of the administrator account that is requesting access to the APIs.
This administrator account is created for the enterprise during the on-boarding procedure.
password
REQUIRED.
Password of the administrator account.
Token - Success Response Parameters
Parameter
Description
token
CONDITIONAL.
JSON Web Token (JWT) token.
Returned only when no error is encountered when the request is processed.
String.
Token - Error Response Parameters
Parameter
Description
error_code
CONDITIONAL.
Error code.
For information about error codes and their descriptions, see Error Codes Returned by APIs for Managing Accounts and User Factors.
Returned only when an error has occurred.
error_description
CONDITIONAL.
Error description.
Returned only when an error has occurred.
Token - Sample Headers
Content-Type: application/json
Token - Sample Payload
{
"client_txn_id":"<client_txn_id>",
"client_app_id":"<client_app_id>", "username":"<username>", "password": "<password>"
}
Token - Sample Success Response (HTTP - 200)
{
"token": "<token>"
}
Token - Sample Error Response (HTTP - 400)
The following response shows details of an error that was encountered:
{
"error_code": "missing_input",
"error_description": "Value for element {client_txn_id} is required"
}
Token - Change Log
There are no changes in the API after the previous release.