DuliDuli Open Platform
EN
简体中文
繁體中文
English
Quick Start APIs DuliDuli Official Website
模板

User


Query User Information

Request


GET http://[SERVER:9022]/v1/user/get_user?access_token=$access_token&type={type}&query=
{account_id | account | phone}


Parameters

Parameters

Type

Required

Description

access_token

String

Y

Authentication token

type

string


Y

Query type,

When type=id, the query parameter is the Account ID,

When type=account, the query parameter is the account name,

When type=phone, the query parameter is the phone number

query

string

Y

Query condition for Account ID: query={account_id}

Query condition for account name: query={account}

Query condition for phone number: query={phone}

Request Example:

  1. Match and query Account ID


/v1/user?access_token=82e3e4re4a49b888d6b05r5t6yb7cd&type=id&query=200200021
  1. Match and query Phone Number


/v1/user?access_token=82e3e4re4a49b888d6b05r5t6yb7cd&type=phone&query=18899999999


Return:

{
"code": 0,
"msg": "ok",
"data":{
"account_id": "200200021",
"account": "kingsley01",
"nick_name": "13610117012",
"status": 1,
"is_online": true,
"mobile_prefix":"86",
"phone": "13111111111",
"gender": 1,
"avatar":"http://...",
"reg_time":"2024-12-12 15:53:07",
"extenal": [
{
"org":"companyA",
"org_id":"1000000",
"email": "13111111111@qq.com",
"dept_list":[
{
"dept_name": "QA",
"dept_id": "1",
"is_dept_head":false
}
]
}
]
}
}

Return Details:

Fields

Type

Desc

account_id

string

User ID

account

string

User Account

nick_name

string

User Name

status

int

"1": Normal, "2": Disabled, "3": Resign

is_online

boolean

• true: Online

• false: Offline

mobile_prefix

string

Phone Number Prefix

phone

string

Phone Number

gender

int

Gender, "1": Male, "2": Female

email

string[]

Email (supports multiple email bindings)

avatar

string

User Avatar URL

reg_time

date

User Creation/Registration Time

extenal

string[]

[{

"org":"companyA",

"org_id":"1000000", //

"email": "13111111111@qq.com",

"dept_list": [

{

"dept_name": "QA", //

"dept_id": 1, //

"is_dept_head":false

}]

}]

Error Codes

code

message

Desc

100030

invalid user id

invalid user id

100031

invalid query type

invalid query type

Global Codes

2

system error

system error

100010

token expire

token expire