Get Customer Token
POST/customer/token
This is used to get the customer (end-user application) access token using the server access token and customer number created in the GTN trading platform. This access token can be used to access the GTN open API via end-user applications.
Request
- application/json
Body
customerNumber stringrequired
Customer Number of a customer.
Example: ASI685695865
accessToken stringrequired
Server access token which gained from authentication/severAuthToken
Responses
- 200
- 401
OK
- application/json
- Schema
- Example (from schema)
- example
Schema
status stringrequired
Possible values: [SUCCESS
, FAILED
]
reason stringrequired
rejectCode integerrequired
Find error codes here
accessToken string
refreshToken string
accessTokenExpiresAt integer
UTC time
refreshTokenExpiresAt integer
UTC time
tokenType string
Example: bearer
{
"status": "SUCCESS",
"reason": "string",
"rejectCode": 0,
"accessToken": "string",
"refreshToken": "string",
"accessTokenExpiresAt": 0,
"refreshTokenExpiresAt": 0,
"tokenType": "bearer"
}
{
"status": "SUCCESS",
"reason": "auth token generation success",
"rejectCode": 0,
"accessToken": "O0AeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiY3VzdG9tZXIiLCJwcm92aWRlciI6Im9tcyIsImlzcyI6IkdUTiIsImluc3RDb2RlIjoiVFJBREVfQVBJX0lOU1RfT05FIiwiY3VzdG9tZXJOdW1iZXIiOiJBU0kxMTEwNTMxNTIiLCJlbnYiOiJBU0lBLVVBVCIsImV4cCI6MTcwOTA0Njc2OCwiaWF0IjoxNzA5MDEwNDY4LCJqdGkiOiJiZGNkYzVmMC1mODcyLTQ2NWEtYTBlMC0zZGRjZTI0ZmZjOTkifQ.zTuSBSICWTohSTAIGW5aMTn6xRNMSPLWh4RDv3kyZb8",
"refreshToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiY3VzdG9tZXIiLCJwcm92aWRlciI6Im9tcyIsImlzcyI6IkdUTiIsImluc3RDb2RlIjoiVFJBREVfQVBJX0lOU1RfT05FIiwiY3VzdG9tZXJOdW1iZXIiOiJBU0kxMTEwNTMxNTIiLCJlbnYiOiJBU0lBLVVBVCIsImV4cCI6MTcwOTA4Mjc2OCwiaWF0IjoxNzA5MDEwNzY4LCJqdGkiOiIwMGVjZWJlNi0yY2Y1LTRlNzctOTI0YS0xMTM0OTVmNzQ4M2EifQ.E5YfHyYVyzWcU3qaDNgXPrZIXXLC5Jxas5CnBSjc6cQ",
"accessTokenExpiresAt": 1709046768697,
"refreshTokenExpiresAt": 1709082768697,
"tokenType": "bearer"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Invalid Token
- Expired Token
Schema
timestamp string
status string
error string
message string
path string
rejectCode string
{
"timestamp": "string",
"status": "string",
"error": "string",
"message": "string",
"path": "string",
"rejectCode": "string"
}
{
"timestamp": "2023-12-28T09:51:50.682Z",
"status": "401",
"error": "Unauthorized",
"message": "Invalid Token",
"path": "/api/auth/customer/token",
"rejectCode": "1008"
}
{
"timestamp": "2023-12-28T09:51:50.682Z",
"status": "401",
"error": "Unauthorized",
"message": "Expired Token",
"path": "/api/auth/customer/token",
"rejectCode": "1007"
}
Loading...
Is this page helpful for you?