Get User Information
This interface is primarily used by third-party applications to retrieve information about the currently logged-in user from Bamboo Cloud IDaaS when logging in with Bamboo Cloud IDaaS.
# Request Description
GET https://{your_domain}/api/v1/oauth2/userinfo
# Request Headers
| Parameter Name | Chinese Name | Required | Example Value | Description |
|---|---|---|---|---|
| Authorization | Authentication Information | Required | Bearer 3oDi8mk0q9mnTpGxcHu3Gi_vX4o | access_token |
# Request Example
GET https://{your_domain}/api/v1/oauth2/userinfo
Authorization: Bearer 3oDi8mk0q9mnTpGxcHu3Gi_vX4o
# Response Example
Correct Response Example
HTTP Status: 200 OK
{
"id": " 20220309143802668-2F0B-7F90BEDCC"
"userName": "zhangsan",
"mobile": "+86-10012345678",
"email":"zhanshang@qq.com",
"name": "张三"
}
Error Response Example
HTTP Status: 401 UNAUTHORIZED
{
"error": "invalid_token",
"error_description": "Invalid access token: 3oDi8mk0q9mnTpGxcHu3Gi_vX4o "
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Response Parameters
After successful user authentication, the user attributes returned by Bamboo Cloud IDaaS to the target application support mapping functionality. For example, if the target application's username attribute is loginName and Bamboo Cloud IDaaS's username is userName, the attribute mapping interface will return the username attribute as loginName, with its value being the userName attribute value from Bamboo Cloud IDaaS.
The following are the default attribute mapping response parameters from Bamboo Cloud IDaaS.
| Field Name | Chinese Name | Example Value |
|---|---|---|
| id | User ID | 20220309143802668-2F0B-7F90BEDCC |
| userName | Username | zhangsan |
| name | Full Name | 张三 |
| Email Address | zhangsan@email.com | |
| mobile | Mobile Number | +86-10012345678 |
I'm ready. Please paste the Markdown content you need translated.
