1. How do I generate an access token?
You can generate an access token by sending a POST request to the Token Authentication API. Provide the following parameters:
-
accessKey: Found in the WebSaaS platform under Account Management.
-
timestamp: A 13-digit timestamp within a 300-second range from the current time.
-
signature: A SHA256-encrypted string combining
accessKey,secretKey, andtimestamp.
2. How long is the token valid?
The token’s validity is defined by the periodSecond parameter (default 3600 seconds). It can be set between 60 and 86400 seconds.
3. What are the possible error codes when generating a token?
-
PARAMETER_ERROR: One or more parameters are missing or invalid.
-
ACCOUNT_DISABLED: The account is disabled; contact your sales manager.
-
CLIENT_ERROR: Indicates an HTTP client error (e.g., 400 Bad Request).
4. How do I handle token expiration?
Tokens expire after their defined validity period. Re-generate a token when the current one expires.
5. Can I use the same token for multiple requests?
Yes, a valid token can be used for multiple API calls until it expires.
6. What should I do if I encounter "Access Denied" errors?
Ensure:
-
Your token has not expired.
-
The
accessKeyandsecretKeyare correctly configured. -
Your account has the required permissions.
7. Why is my signature invalid?
Double-check that the accessKey, secretKey, and timestamp are concatenated in the correct order and hashed using SHA256 accurately.
8. Is the token generation API usage free?
Yes, generating tokens is free and will not incur any charges.
Comments
0 comments