Skip to content

Update User Mobile with WeChat Authorized Mobile

Some features of the Mini Program require the user to have a mobile number. After obtaining user authorization, call this API to update the user's mobile number to the WeChat authorized mobile number.

Request Description

POST https://{your_domain}/api/v2/sdk/profile/update-mobile-by-wechat

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
AuthorizationAuthorization infoYesStringBearer
content-typeContent format typeYesStringapplication/json

Request Example

json
{
    "wechat_code":"38e915cd65e12e047c2a577be6bb2"
}

Request Parameters

Parameter NameNameRequiredTypeDescription
wchat_codeWeChat mobile number authorization codeYesStringAuthorization code returned by the WeChat Mini Program after the Mini Program prompts the user with the WeChat mobile number authorization pop-up and the user authorizes

Response Examples

Success Example

HTTP/1.1 200 OK

Error Example

HTTP/1.1 400 Bad Request

json
{
    "error_msg": "Error calling wechat miniprogram interface",
    "error_code": " IDAAS.SDK.LOGIN.1001"
}

Response Parameters

None

BambooCloud IDaaS Open Platform