Generate User Details Using Access Token

get

/oauth2/v1/userinfo

Request

Supported Media Types
Header Parameters
Back to Top

Response

Supported Media Types

200 Response

User information generated
Body ()
Root Schema : userinfo
Type: object
Generate the user information in JSON format.
Show Source

400 Response

Invalid request
Body ()
Root Schema : error
Type: object
Error message that appears during Access Token generation
Show Source
Back to Top

Examples

The following example shows how to obtain user information using an access token by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL. See the Authorization section for more information on grant types.

Example Request Using cURL

Note:

The command in this example uses the URL structure https://tenant-base-url/resource-path, where tenant-base-url represents the Identity Service URL, and the resource path represents the Identity Service API. See Send Requests for the appropriate URL structure to use.

The following shows an example cURL request using an access token to obtain user information

curl -i 
-H 'Authorization: Bearer <Access Token Value>' 
-H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8'
--request GET https://tenant-base-url/oauth2/v1/userinfo'

Example of Response Body

The following example shows the contents of the response body in JSON format:

{
    "birthdate": "",
    "family_name": "opc",
    "gender": "",
    "given_name": "admin",
    "name": "admin opc",
    "preferred_username": "admin@example.com",
    "sub": "admin@example.com",
    "website": ""
  }
Back to Top