Skip to content

Update User Mobile via WeChat Authorized Mobile

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

Request Description

Request Headers

Parameter NameNameRequiredTypeExample
X-operating-sys-versionClient Operating System VersionYesStringwindows10.1.1
X-device-fingerprintClient Device FingerprintYesString156aysdna213sc50
X-device-ipClient IPNoString192.168.1.2
X-agentUser-Agent InformationYesStringMozilla/5.0 (iPhone; CPU iPhone OS 13_3 like Mac OS X)
X-LUsed for Internationalization Language SettingsNoStringzh
X-client-idApplication Authorization IDYesStringnTo1eRIub60vPb54WeE6aojPwYwImtl4
AuthorizationAuthorization InformationYesStringBearer {id_token}
content-typeContent Format TypeYesStringapplication/json

Request Example

json
{
    "wechat_code":"38e915cd65e12e047c2a577be6bb2"
}

Request Parameters

Parameter NameNameRequiredTypeDescription
wechat_codeWeChat Mobile Authorization CodeYesStringAuthorization code returned by the WeChat Mini Program after the user authorizes the WeChat mobile authorization popup launched by the Mini Program

Response Example

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