Skip to content

Bind User with Alipay Authorized Mobile

Call this API when using Alipay authorized mobile to bind a user.

Request Description

POST https://{your_domain}/api/v2/sdk/social/alipay-mini-mobile-bind

Request Headers

Parameter NameNameRequiredTypeExample
X-operating-sys-versionCaller client OS versionYesStringwindows10.1.1
X-device-fingerprintCaller client device fingerprintYesString156aysdna213sc50
X-device-ipCaller client IPNoString192.168.1.2
X-agentUser-Agent informationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X)
X-LUsed for international language settingsNoStringzh
X-client-idApplication authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
X-state-tokenTemporary tokenYesStringeyJhbcOiJ……nEPRiIC4we0
content-typeContent format typeYesStringapplication/json

Request Example

json
{
    "alipay_encrypt":"6213b8e364d3f0eaf7cf196bfe49675553b4919d6e664b70d5eaa6cbf8531afe"
}

Request Parameters

Parameter NameNameRequiredTypeDescription
alipay_encryptAlipay mobile number encrypted dataYesStringEncrypted 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 NameNameTypeDescription
statusLogin flow status identifierStringSUCCES: Login successful
SOCIAL_BIND: Binding flow
USER_REGISTER: Auto-registration and binding flow
ACCESS_DENIED: Access denied
MFA_AUTH: Secondary authentication
expiresession_token validity periodNumbersession_token validity period
session_tokenUser session_tokenStringUser session_token

BambooCloud IDaaS Open Platform