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 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 |
| Authorization | Authorization info | Yes | String | Bearer |
| content-type | Content format type | Yes | String | application/json |
Request Example
json
{
"wechat_code":"38e915cd65e12e047c2a577be6bb2"
}Request Parameters
| Parameter Name | Name | Required | Type | Description |
|---|---|---|---|---|
| wchat_code | WeChat mobile number authorization code | Yes | String | Authorization 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