Skip to content

UserInfo request

The userinfo endpoint is used to return user information about the authenticated end-user as claims. It may contain claims not in the id_token. The user sends the userinfo request using either HTTP GET or HTTP POST. The access token obtained from an OpenID Connect authentication request must be sent as a bearer token.

  • API Call:

    • GET {baseURL}/oauth/userinfo
    • POST {baseURL}/oauth/userinfo
  • Headers:

    • Authorization: Bearer
    • Accept: application/json
Example request
GET: /oauth/userinfo
Host: id.trimble.com
Accept: application/json
Authorization: Bearer VmNqWUx0VWs4R3dCRHhpakNVbjNfTks1TDNvYTpoVkdERjNFdnp1VU9kaU1ra1ozaVU5d2ZZc0lh

The UserInfo claims are returned as the members of a JSON object unless a signed or encrypted response was requested during client registration.

HTTP/1.1 200 OK
  Content-Type: application/json
{
"iss": "https://id.trimble.com",
"sub": "f6519594-4868-4355-b4bd-137dd608207c",
"identity_type": "user",
"given_name": "Jane",
"family_name": "Doe",
"email": "janedoe@example.com",
"email_verified": true,
"locale": "en-US",
"preferred_mfa_setting": "SMS_MFA",
"picture": "https://us.id.trimble.com/ui/resources/default_profile.png?v=1",
"data_region": "us"
}

When an error condition occurs, the UserInfo Endpoint returns an error response. The following is a non-normative example of a UserInfo error response:

HTTP/1.1 401 Unauthorized
 WWW-Authenticate: error="invalid_token",
 error_description="The Access Token expired"