获取用户所在租户
GET
/api/v2/users/{userId}/tenants
请求参数
Path 参数
userId
string
用户 ID
示例值:
61dfefb326a1113d8293e30d
Header 参数
Authorization
string
Token
示例值:
Bearer Token
x-authing-userpool-id
string
用户池 ID
示例值:
61b95d6c96d42670da568408
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://core.authing.cn/api/v2/users/61dfefb326a1113d8293e30d/tenants' \
--header 'Authorization: Bearer Token' \
--header 'x-authing-userpool-id: 61b95d6c96d42670da568408'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
data
object
必需
id
string
必需
arn
string
必需
userPoolId
string
必需
photo
string
必需
email
null
必需
emailVerified
boolean
必需
phone
null
必需
phoneVerified
boolean
必需
unionid
string
必需
openid
string
必需
username
string
必需
nickname
null
必需
country
null
必需
province
null
必需
company
null
必需
loginsCount
integer
必需
lastIp
string
必需
name
null
必需
givenName
null
必需
familyName
null
必需
middleName
null
必需
profile
string
必需
preferredUsername
null
必需
website
null
必需
gender
string
必需
birthdate
null
必需
zoneinfo
null
必需
address
null
必需
formatted
null
必需
streetAddress
null
必需
region
null
必需
postalCode
null
必需
city
string
必需
blocked
boolean
必需
tenants
array[string]
必需
示例
{
"code": 200,
"message": "获取用户所在租户成功",
"data": {
"id": "61dfefb326a1113d8293e30d",
"arn": "arn:cn:authing:61b95d6c96d42670da568408:user:61dfefb326a1113d8293e30d",
"userPoolId": "61b95d6c96d42670da568408",
"photo": "https://files.authing.co/user-contents/61b95d6c96d42670da568408/avatar/aa194abe-81ab-40e3-a421-91e9cf665cf2.jpg",
"email": null,
"emailVerified": false,
"phone": null,
"phoneVerified": false,
"unionid": "25874685",
"openid": "25874685",
"username": "zhaoyiming0803_oj0g",
"nickname": null,
"country": null,
"province": null,
"company": null,
"loginsCount": 2,
"lastIp": "::1",
"name": null,
"givenName": null,
"familyName": null,
"middleName": null,
"profile": "https://github.com/zhaoyiming0803",
"preferredUsername": null,
"website": null,
"gender": "U",
"birthdate": null,
"zoneinfo": null,
"address": null,
"formatted": null,
"streetAddress": null,
"region": null,
"postalCode": null,
"city": "Beijing, China",
"blocked": false,
"tenants": []
}
}
修改于 2022-01-14 04:11:55