Customer Identity (CIAM)
Register Users with Alipay Authorized Mobile Phone
This interface is called when using Alipay authorized mobile phone login (or automatically registering a user upon first login).
# Request Specification
POST https://{your_domain}/api/v2/sdk/social/alipay-mini-mobile-register-bind
# Request Headers
| Parameter Name | Chinese Name | Required | Type | Example |
|---|---|---|---|---|
| X-operating-sys-version | Calling Client OS Version | Yes | String | windows10.1.1 |
| X-device-fingerprint | Calling Client Device Fingerprint | Yes | String | 156aysdna213sc50 |
| X-device-ip | Calling 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 | For Internationalization Language Setting | 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
{
"alipay_encrypt":"6213b8e3967550d5eaa6cbf8531afe"
}
1
2
3
2
3
# Request Parameters
| Parameter | Chinese Name | Required | Type | Description |
|---|---|---|---|---|
| alipay_encrypt | Alipay Phone Number Encrypted Data | Yes | String | The encrypted Alipay phone number data obtained by the mini program after the user authorizes it via the Alipay phone number authorization pop-up. |
# Response Example
Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
"session_token": "btsiBjx85prcZu6I6Ki057Tmw3nSF2VO",
"expire": 432000,
"status": "SUCCESS"
}
Error Example:
HTTP/1.1 400 Bad Request
{
"error_code": "IDAAS.SDK.COMMON.1007",
"error_msg": "state_token parameter error"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# Response Parameters
| Parameter | Chinese Name | Type | Description |
|---|---|---|---|
| status | Login Process Status Identifier | String | SUCCESS: Login successful SOCIAL_BIND: Binding process USER_REGISTER: Auto-registration binding process 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 |
