Employee Identity (EIAM)

Mobile Phone or Email Binding User Interface

This interface is called when binding a platform user using a mobile phone number or email. Before calling this interface, a temporary token must be obtained through the WeChat Mini Program Login Interface.


# Request Description

POST https://{your_domain}/api/v2/sdk/social/bind

# 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
X-state-token Temporary Token Yes String eyJhbcOiJ……nEPRiIC4we0
content-type Content Format Type Yes String application/json

# Request Example

  1. Using Mobile Number + SMS Verification Code
{
    "mobile":"11012345678",
    "verify_code":"232326"
}
1
2
3
4

# Request Parameters

Parameter Name Chinese Name Required Type Description
mobile Mobile Number Yes String The mobile number receiving the verification code
verify_code SMS Verification Code Yes String The received verification code
Refer to the Send SMS Verification Code API to get the verification code
type = BIND_MOBILE_SMS
  1. Using Email + Email Verification Code
{
    "email":"zhangsan@qq.com",
    "verify_code":"123456"
}
1
2
3
4

# Request Parameters

Parameter Name Chinese Name Required Type Description
email Email Yes String The email address receiving the verification code
verify_code Email Verification Code Yes String The received verification code
Refer to the Send Email Verification Code API to get the verification code
type = BIND_EMAIL_EMS

# Response Example

Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "session_token": "btsiBjx85prcZu6I6Ki057Tmw3nSF2VO",
    "expire": 432000,
    "status": "SUCCESS",
    "id_token": " eyJraWQn0.eyJpc3MiOiJodHR…g1A7jG8O0uw"
}

Error Example:
HTTP/1.1 400 Bad Request
{
    "error_code": "IDAAS.SDK.COMMON.1007",
    "error_msg": "state_token parameter error"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

# Response Parameters

Parameter Name Chinese Name Type Description
status Login Process Status Identifier String SUCCES: Login Successful SOCIAL_BIND: Binding Process USER_REGISTER: Auto-registration Binding Process ACCESS_DENIED: Access Denied MFA_AUTH: Secondary Authentication
expire session_token Validity Period Number Session_token Validity Period
session_token User session_token String User session_token
id_token Identity token of the logged-in user, short-term valid String This field is in JWT format and contains user identity information. Refer to "Get User Information Based on id_token" to retrieve user information. The token validity period defaults to 5 minutes.