Updated on 2024-12-30 GMT+08:00

Querying Personal Information

Function

This API is called when querying personal information after a user successfully logs in.

URI

GET /api/v2/sdk/profile

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-operating-sys-version

Yes

String

Caller OS version, for example, Android 10.

X-device-fingerprint

Yes

String

Caller device fingerprint, for example, 156aysdna213sc50.

X-device-ip

No

String

Caller IP address, for example, 10.10.10.1

X-agent

Yes

String

User agent information, for example, Mozilla/5.0 (Linux; Android 10; Redmi K30 Build/QKQ1.190825.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36

X-L

No

String

Language type, for example, en.

X-client-id

Yes

String

Application ID, which is a ClientId allocated to an application after registration.

X-signature

Yes

String

In the encrypted data session_token=xxx&timestamp=xxx&nonce=xxx, session_token indicates the session token, timestamp indicates the current timestamp, nonce indicates the timestamp's hexadecimal value, and the encryption mode is RSA. The current timestamp can be obtained by calling the API for obtaining the server time, and the public key for encryption can be obtained by calling the API for obtaining the public key.

X-tenant-id

No

String

Tenant ID. This parameter is mandatory when calling an ISV application. Replace "{domain_name}" with the ISV common domain name "{common_domain}". In the request header, specify tenant_id of the corresponding tenant and replace X-client-id with client_id of the ISV application template.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

user_name

String

Username.

name

String

Name.

head_img

String

Profile picture URL.

email

String

Email address.

mobile

String

Mobile number.

attr_gender

String

Gender. Options:

female: female;

male: male;

unknown: confidential

attr_birthday

String

Birthday. Format:

yyyy-MM-dd

attr_nick_name

String

Alias.

first_name

String

Name.

middle_name

String

Middle name.

last_name

String

Last name.

extension

String

Extended attribute.

Status code: 400

Table 3 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error details.

Example Requests

None

Example Responses

Status code: 200

Request successful.

{
  "user_name" : "John",
  "name" : "Johnson",
  "head_img" : "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTIQ8QOTSn3y4cYHLlMC3sv6RCBmeMkxtOog47Zr3v2Afbqc2bmP0WibUIUskX39eJlJAEbAibXs",
  "email" : "12345678901@example.com",
  "mobile" : "12345678901",
  "attr_gender" : "male",
  "attr_birthday" : "Feb 17, 2022",
  "attr_nick_name" : "Johnson",
  "first_name" : "Johnson",
  "middle_name" : "Johnson",
  "last_name" : "Johnson",
  "extension" : {
    "age" : "18"
  }
}

Status Codes

Status Code

Description

200

Request successful.

400

Invalid parameter.

Error Codes

See Error Codes.