General Questions
Q1: What is the purpose of the Token Authentication API?
-
This API generates an access token required to authenticate requests to the Bank Account Check API and other ADVANCE APIs.
Q2: What are the prerequisites for generating a token?
-
You need your
accessKeyandsecretKey, available on the WebSaas Platform under Account Management.
Integration and Usage
Q3: What is the request URL and method for the Token Authentication API?
-
URL:
https://api.advance.ai/openapi/auth/ticket/v1/generate-token -
Method: POST (Content-Type:
application/json)
Q4: What parameters are required to request a token?
-
accessKey(string): Your access key. -
timestamp(string): 13-digit UNIX timestamp. -
signature(string): SHA256-encrypted combination ofaccessKey,secretKey, andtimestamp. -
periodSecond(optional): Token validity in seconds (default: 3600; minimum: 60; maximum: 86400).
Q5: How do I generate the signature?
-
Combine your
accessKey,secretKey, andtimestampinto a single string and encrypt it using SHA256.
Responses
Q6: What does a successful token response look like?
{
"code": "SUCCESS",
"message": "OK",
"data": {
"token": "eyJhbGciOiJIUzUxMiJ9...",
"expiredTime": 1642580192430
},
"transactionId": "123456789",
"pricingStrategy": "FREE"
}
Q7: What should I do if I receive a PARAMETER_ERROR response?
-
Ensure all required parameters are provided and correctly formatted.
Q8: How do I resolve an ACCOUNT_DISABLED error?
-
Contact your sales manager for assistance.
Q9: How often do I need to regenerate the token?
-
Regenerate a new token before the expiration of the current one to maintain access to ADVANCE APIs.
Troubleshooting
Q10: What should I do if I encounter a CLIENT_ERROR?
-
Verify the request format and parameters. Check the API documentation for guidance or contact technical support if the issue persists.
Comments
0 comments