View userInfo Information

Endpoint URL: /{customerId}/profiles/oidc/userinfo



Description

Returns user profile information for from the userinfo endpoint. See OpenID Connect Scopes and Claims for more information on how scopes are requested and whhy scopes may (or may not) be available from the userinfo endpoint.


URI Parameters

No additional parameters are required to call the /{customer_id}/oidc/userinfo endpoint.


Authentication

This endpoint requires Bearer authentication. To use this authentication, include the word Bearer in your Authorization header, followed by the value of the access token being used to retrieve the user data. For example:

Authorization: Bearer 03v-cgrdpp69hHXXIx56pRLyD98kldDxqEwI59MFCFGVuSkLmmkzgmfwm324Wli


Sample Request (curl)

The following command returns user information for the user granted the access token 03v-cgrdpp69hHXXIx56pRLyD98kldDxqEwI59MFCFGVuSkLmmkzgmfwm324Wli:

curl \
   https://v1.api.us.janrain.com/00000000-0000-0000-0000-000000000000/profiles/oidc/userinfo \
   -H 'Authorization: Bearer 03v-cgrdpp69hHXXIx56pRLyD98kldDxqEwI59MFCFGVuSkLmmkzgmfwm324Wli' 


Responses

200 OK

If your call to this endpoint succeeds, you'll get back the requested user profile information:

{
    "email": "karim.nafir@mail.com",
    "email_verified": true,
    "global_sub": "capture-v1://se-demos-gstemp.us-dev.janraincapture.com/
79y4mqf2rt3bxs378kw5479xdu/GREG_DEMO/3c388dd9-5bcc-4883-9a91-d51129110a4a",
    "sub": "3c388dd9-5bcc-4883-9a91-d51129110a4a"
}


Error Codes

The following table includes information about some of the error codes that you could encounter when calling this endpoint.

Error Code

Description

400

Error Message: Invalid_request

Indicates that the subject and data authority do not match.

401

Error Message: Invalid_token

Typically occurs if you pass an invalid authorization code or if the authorization code has expired. Authorization codes are valid only for a few minutes.

If you encounter an error when calling this endpoint your error message will look similar to this:

{
   "error": "invalid_request",
   "error_description": "subject and data authority host do not match"
}