Customer Identity (CIAM)

Update User Mobile with WeChat Authorized Phone

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

# Request Description

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

# Request Headers

Parameter Description Required Type Example
X-operating-sys-version Client Operating System Version Yes String windows10.1.1
X-device-fingerprint Client Device Fingerprint Yes String 156aysdna213sc50
X-device-ip 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
Authorization Authorization Information Yes String Bearer {id_token}
content-type Content Format Type Yes String application/json

# Request Example

{
    "wechat_code":"38e915cd65e12e047c2a577be6bb2"
}
1
2
3

# Request Parameters

Parameter Name Chinese Name Required Type Description
wchat_code WeChat Phone Number Authorization Code Yes String The authorization code returned by the WeChat Mini Program after the user grants permission through the WeChat phone number authorization popup triggered by the mini program

# Response Example

Success Example:
HTTP/1.1 200 OK
Content-Type: application/json


Error Example:
HTTP/1.1 400 Bad Request
{
    "error_msg": "调用 wechat miniprogram 接口出错",
    "error_code": " IDAAS.SDK.LOGIN.1001"
}
1
2
3
4
5
6
7
8
9
10
11

# Response Parameters

None