Token
Action: POST
Endpoint: /api/Token
API Version 1.3
Request fields details
Fields | Description |
---|---|
UserID string Conditional |
User ID provided by CoreCARD to login in CoreCard System. Condition: mandatory when GrantType = AccessToken. Allowable Values: 40 |
Password string Conditional |
Password of user id Condition: mandatory when GrantType = AccessToken. Allowable Values: 32 |
GrantType string Optional |
Grant Type. Valid values : 'AccessToken', and 'RefreshToken'. Allowable Values: 32 |
RefreshToken string Conditional |
use this to re generate Access Token Condition:Mandatory when GrantType = RefreshToken. |
APIVersion string Mandatory |
Version of the API to be invoked Example: 1.3 Allowable Values: 10 |
IPAddress string Mandatory |
IP Address of sender Example: 10.206.0.204 Allowable Values: 15 |
Source string Mandatory |
Source from where API Call is initiated. CoreCard have multiple value of source for internal system (CoreMoney, SelfService, IVR, MobileSelfService) For external system expected source will be WEB. Allowable Values: 50 |
CallerID string Optional |
Caller Id of source from where API is initiated. It is End User phone number. Example: 7204454214 Condition - applicable in Case of IVR Allowable Values: 20 |
CalledID string Optional |
Called Id of destination for which API is initiated. It is Corecard IVR number. Example: 7314145404 Condition - applicable in Case of IVR Allowable Values: 20 |
SessionID string Optional |
Reserved for future use Allowable Values: 50 |
ANI string Optional |
Reserved for future use Allowable Values: 0 |
DNS string Optional |
Reserved for future use Allowable Values: 0 |
Language string Conditional |
username of user. Condition:Mandatory. Allowable Values: 2 |
RequestDate string Optional |
Request Date Time of API Format: MM-DD-YYYYTHH:MM:SS Example:- 11-12-2021T13:05:10 Allowable Values: 19 |
username string Conditional |
username of user. Condition:Mandatory. |
auth_header string Conditional |
username of user. Condition:Mandatory. |
Sample request body
{ "language": "en", "APIVersion": "1.3", "IPAddress": "10.206.2.197", "Source": "WEB", "CallerID": "", "CalledID": "", "SessionID": "", "ANI": "", "DNS": "", "RequestDate": "", "UserID": "TestUser", "Password": "XXXXXXXXXX", "GrantType": "AccessToken", "RefreshToken": "" }
Response fields details
Fields | Description |
---|---|
access_token string |
This tag reflects Access Token which is used to access CoreCard API's. |
token_type string |
Type of token. |
expires_in string |
This tag reflects the Expires. It is the time when provided Access Token has been expired. |
refresh_token string |
This tag reflects Refresh Token. It is used to re generate Access Token when the GrantType value is RefreshToken. |
issued string |
This tag reflects the IssuedAt. It is the time when token provided to access CoreCard API. |
userName string |
This Tag reflects User ID provided by CoreCARD to login in CoreCard System. |
Message string |
Returns Error Message in case of Error. |
Status boolean |
Returns result of API processing. If any error is found then value will be 'false' else 'true'. |
ErrorCode string |
Returns Error Code in case of Error. |
ResponseData
|
This is group of below data elements. |
expires string |
Time when provided Access Token will be expired. |
AccessToken string |
Token to access CoreCard API's. |
RefreshToken string |
Use Refresh Token to re generate Access Token with GrantType as RefreshToken. |
TokenType string |
Type of token. Valid Value : Bearer |
UserID string |
User ID provided by CoreCARD to login in CoreCard System. |
IssuedAt string |
Time when token provided to access CoreCard API. |
Sample response body
{ "Message": "Successful.", "Status": true, "ErrorCode": "00000", "ResponseData": { "AccessToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX", "RefreshToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX", "TokenType": "bearer", "UserID": "TestUser", "IssuedAt": "Wed,30 Mar 2022 08:17:56 GMT", "Expires": "Wed,30 Mar 2022 08:47:56 GMT" } }