Register User with Alipay Authorized Mobile
Call this API when logging in with Alipay authorized mobile (or automatically registering a user on first login).
Request Description
POST https://{your_domain}/api/v2/sdk/social/alipay-mini-mobile-register-bind
Request Headers
| Parameter Name | Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Caller client OS version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Caller client device fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Caller client IP | No | String | 192.168.1.2 |
| X-agent | User-Agent information | Yes | String | Mozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X) |
| X-L | Used for international language settings | No | String | zh |
| X-client-id | Application authorization ID | Yes | String | nTo1eRIub60vPb54WeE6aojPwYwImtl4 |
| X-state-token | Temporary token | Yes | String | eyJhbcOiJ……nEPRiIC4we0 |
| content-type | Content format type | Yes | String | application/json |
Request Example
json
{
"alipay_encrypt":"6213b8e3967550d5eaa6cbf8531afe"
}Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| alipay_encrypt | Alipay mobile number encrypted data | Yes | String | Encrypted Alipay mobile number data obtained by the Mini Program after prompting the user with the Alipay mobile number authorization pop-up and the user authorizing |
Response Examples
Success Example
HTTP/1.1 200 OK
json
{
"session_token": "btsiBjx85prcZu6I6Ki057Tmw3nSF2VO",
"expire": 432000,
"status": "SUCCESS"
}Error Example
HTTP/1.1 400 Bad Request
json
{
"error_code": "IDAAS.SDK.COMMON.1007",
"error_msg": "state_token parameter error"
}Response Parameters
| Parameter Name | Name | Type | Description |
|---|---|---|---|
| status | Login flow status identifier | String | SUCCES: Login successful SOCIAL_BIND: Binding flow USER_REGISTER: Auto-registration and binding flow ACCESS_DENIED: Access denied MFA_AUTH: Secondary authentication |
| expire | session_token validity period | Number | session_token validity period |
| session_token | User session_token | String | User session_token |