Get Token
Introduction
- Need to provide the user’s real email address.
- Use uid to generate user token, which is only supported for new users, and users must perform email verification when logging in for the first time.
- The accessToken is valid for 10 days.
API Description
Request Method: POST
Request Path: /open/api/v4/merchant/getToken
Header Parameters:
Parameter | Mandatory | Type | Remarks |
---|---|---|---|
appid | Y | string | App unique identifier |
timestamp | Y | string | Current UTC 13-digit timestamp, valid within 5 minutes |
sign | Y | string | Signature, you can refer to the signature Click Here |
Body Parameters:
Parameter | Mandatory | Type | Length | Remarks |
---|---|---|---|---|
Conditional Mandatory | string | / | User's email | |
uid | Conditional Mandatory | string | 36 | User’s UUID from merchant side |
Example
Request Parameters:
{
"email": "[email protected]"
}
Response:
{
"success": true,
"returnCode": "0000",
"returnMsg": "SUCCESS",
"extend": "",
"data": {
"id": "kklzDn3K/BvuSXs559OQfQ==",
"accessToken": "ACH8945766425@ACH@kklzDn3K/BvuSXs559OQfQ==@PAY@cwqgsiyILMYNuMjhxhaQLpCX1hnntIqfL+V7uEqNu6I=@IO@g5aBrOrzxrfzsqs8W0cKR4VBugBZBSH5gYLOoL1eHICLR3GTygMCaCN3RvIMaeOUmy9PAVmFImjz+4uXR1MpRg==",
"email": "cwqgsiyILMYNuMjhxhaQLpCX1hnntIqfL+V7uEqNu6I="
},
"traceId": "642e6990f3481462c6185b310ba2120b"
}
Uid Example
Request Parameters:
{
"uid": "1234567xxxxx"
}
Response:
{
"success": true,
"returnCode": "0000",
"returnMsg": "SUCCESS",
"extend": "",
"data": {
"accessToken": "ACH8658667838@ACH@0sf2EDon8eujsasbMDo3g==@PAY@XXpkhtp3Oau+DfgOqwUNUEk1Ijdx7175Cpbcw2sm8hQ=@IO@oKMVGvEf/W9C3QD1/eEsRraWzYaQPJxS9L96NSQWCOheWzsOeRSBmZfxj8Vdu5kpLQy+pymyVbSdtFETC2Znwg==",
"id": "G0sf2Eon8eujsasbMDo3g=="
},
"traceId": "67ff761516e999cf1038d8a2f71e6de7"
}
Error Message
Code | Description | ReturnMsg |
---|---|---|
3108 | Missing Parameter | Must send one of the parameters |
Updated 11 days ago