# Get Maxus JWT Token
# API Description
This API is used to get the Maxus JWT token.
# Environment
# Test Environment
https://oversea.saicmaxus.com/australia/test/base/api/token/register
# Prod Environment
https://oversea.saicmaxus.com/australia/base/api/token/register
# Request
# Payload
| Name | Type | Required | Description |
|---|---|---|---|
| ServiceCode | String | Yes | Service code, please apply by email |
| ServiceSecret | String | Yes | Service secret, please apply by email |
# Method
POST
# Example
curl --location 'https://oversea.saicmaxus.com/australia/test/base/api/token/register' \
--header 'Content-Type: application/json' \
--header 'Cookie: HttpOnly' \
--data '{
"serviceCode":"**",
"serviceSecret":"**"
}'
# Response
# Payload
| Name | Type | Description |
|---|---|---|
| status | int | 1: Success, 0: Failure |
| errMsg | String | Error message |
| data | String | maxus_jwt token |
# Status Code
| Status Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 403 | Forbidden |
| 404 | Not Found |
| 500 | Unknown Error |
| 503 | Dependency System Unavailable |
# Example
{
"data": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhc2NDb2RlIjoiMSIsImFzY0lkIjoxLCJhc2NOYW1lIjoiMSIsImNhbGxCYWNrVXJsIjoiMSIsImV4cGlyZVRpbWVTdGFtcCI6IjE3MDM1Njk1MjAxOTAiLCJyZW1hcmsiOiIxIiwicnNhVk8iOnsicnNhUHVibGljRXhwb25lbnQiOiIxMDAwMSIsInJzYU1vZHVsZXMiOiI4ZTY2ZjE3NzYzNDY0ZmYzYjBhMjBiY2IxZTFlMDdmMDNhN2ZmNmIxYTkyZjQ0ODQzOTE4NTE4MzU0MDAxZWQ4MWM0ZWE4MGFjOGQ5Y2UwYjc3MDFmNGYwYzQ1ODMyMDY1OGY2N2QzNWZlNDVmNTg4YmYzMDZlNWNhOTEzMjdmNjU1NTE4Mjk2M2Q3YWM5OGYxNTVjZTkzOWU0YjJjNDlhZDhiM2QyOGY0YmY5YTBlZTc5YzVkZDcwZWQzODQyY2JmMmQ3NjM0NGUxMzFmYWM4MDY2OWEzNTAwZTMyZjQyYzg1ZWZlMjliMTFhNWYyZTgyYzIzNDUyZTUzNzViNjYzIiwicnNhUHJpdmF0ZUV4cG9uZW50IjoiNDIyY2RkYTY5ZDA4NDY0YzU5Mzc5Y2UyNjlkZjBiZDI1YmU1MmU4N2I2MzcyNDkwOGI5NWRjZmY3YTMwNGEyNTI0ZDY3YWE5ZjQ1NzlmMzQ1ZGJjMTc4ZjMxYjc0ODljMDE4ODllN2M1MjZiNDE2NGE4NzA4MWMwZTZjMzYzYWM5NTBmMTRmZmM4M2M4N2FlMWQyZTk3YzYzNTNlOWUzMTE2MTY0YTFlNmMzODY2MjFjODEyNDE0N2VjYjczNTA4M2Y1YzA2YjNiMDczODc3Y2M4ZjYzY2MyMjJlYTZjOGVlZmNmOTVkZWY0OGNmYTVjZjBmNGQzYzMyMzhiOGFkNSIsImdhaW5Db3VudCI6NDN9LCJzYXBBY2NvdW50IjoiMSIsInNlcnZpY2VDb2RlIjoiYXVzdHJhbGlhIiwiaWF0IjoxNzAzNTY5MzQwLCJleHAiOjE3MDM1NzA3ODB9.10vrdMEdCEZPsI0vtjrxLszvKBE6118wUetJ7dwadD0",
"errMsg": "register success",
"status": 1
}
# Notice
TIP
Standardized timestamp: In the request header, add the timestamp, such as: X-Timestamp: 1577836800Standardized rate limiting: Limit 600 requests per minute to avoid excessive requests.Standardized cache control: Add cache control in the response header, such as: Cache-Control: no-cache
# Logic
# Token Validity
A new token will be issued each time. Each token is valid within 3 minutes.
# Token Usage
For each business request, include "maxus_jwt" as the header key and use the data from the response of the maxusJwt API as the value. Only by making the business request with this header can you obtain the business response that satisfies the token validation. It is recommended to fetch a new maxus_jwt token for each request.