Get User Info
This API is mainly used when a third-party application logs in with BambooCloud IDaaS to obtain information about the currently logged-in user from BambooCloud IDaaS.
Request Description
GET https://{your_domain}/api/v1/oauth2/userinfoRequest Headers
| Parameter | Name | Required | Example | Description |
|---|---|---|---|---|
| Authorization | Authentication info | Required | Bearer 3oDi8mk0q9mnTpGxcHu3Gi_vX4o | access_token |
Request Example
GET https://{your_domain}/api/v1/oauth2/userinfoAuthorization: Bearer 3oDi8mk0q9mnTpGxcHu3Gi_vX4o
Response Example
Success response example
HTTP Status: 200 OK
{
"id": " 20220309143802668-2F0B-7F90BEDCC"
"userName": "zhangsan",
"mobile": "+86-10012345678",
"email":"zhangsan@email.com",
"name": "Zhang San"
}Token does not exist or has expired
HTTP Status: 401 UNAUTHORIZED
{
"error": "invalid_token",
"error_description": "Invalid access token: 3oDi8mk0q9mnTpGxcHu3Gi_vX4o "
}Response Parameters
After successful user authentication, the user attributes returned by BambooCloud IDaaS to the target application support mapping. For example, if the target application's username attribute is loginName and the BambooCloud IDaaS username attribute is userName, the attribute mapping interface will return the username attribute as loginName with the value of the BambooCloud IDaaS userName attribute.
The following are the default attribute mapping response parameters of BambooCloud IDaaS.
| Field Name | Name | Example |
|---|---|---|
| id | User ID | 20220309143802668-2F0B-7F90BEDCC |
| userName | Username | zhangsan |
| name | Full name | Zhang San |
| zhangsan@email.com | ||
| mobile | Mobile | +86-10012345678 |