嘟哩開放平臺
简体中文
繁體中文
English
快速開始 開放接口 嘟哩官網
模板

用戶


査詢用戶資訊

請求說明


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


請求參數

參數


類型

是否必填

說明

access_token

String

Y

認證的token

type

string


Y

査詢類型,

當type=id查詢準則query為帳號ID,

當type=account查詢準則query為帳號account,

當type=phone查詢準則query為手機號

query

string

Y

查詢準則query為帳號ID:query={account_id}

查詢準則query為帳號ID:query={account}

查詢準則query為手機號:query={phone}

請求示例:

  1. 匹配査詢帳號ID

js

/v1/user?access_token=82e3e4re4a49b888d6b05r5t6yb7cd&type=id&query=200200021

  1. 匹配査詢手機號

js

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


返回結果示例

{
"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
}
]
}
]
}
}

結果欄位說明:

字段

類型

說明

account_id

string

用戶id

account

string

用戶帳號

nick_name

string

用戶名稱

status

int

“1”:正常,“2”:禁用,“3”:離職

is_online

boolean

是否線上

  • true: 線上
  • false: 離線

mobile_prefix

string

手机号前缀

phone

string

手機號碼

gender

int

性別,“1”:男,“2”:女

email

string[]

郵箱(支持多郵箱綁定)

avatar

string

用戶頭像地址

reg_time

date

用戶創建/註冊時間

extenal

string[]

[{

"org":"companyA", // 所屬組織(公司)

"org_id":"1000000", //

"email": “ 13111111111@qq.com “,//郵箱

"dept_list": [

{

"dept_name": "QA", // 部門名稱

"dept_id": 1,//部門id

“is_dept_head”:false //部門負責人, false: 否, true: 是

}]

}]


状态码說明

code

message

說明

100030

invalid user id

用戶ID無效

100031

invalid query type

參數類型錯誤

通用错误码



2

system error

系統异常

100010

token expire

token已失效