Employee Identity (EIAM)

Update User Mobile Number Using WeChat Authorization

Some features of the Mini Program require users to have a mobile phone number to use. After obtaining user authorization, calling this API can 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 Chinese Name Required Type Example
X-operating-sys-version Calling Client Operating System Version Yes String windows10.1.1
X-device-fingerprint Calling Client Device Fingerprint Yes String 156aysdna213sc50
X-device-ip Calling 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 when the mini program triggers the WeChat phone number authorization popup.

# 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
12

# Response Parameters

None