View userinfo information

Returns user profile information for from the userinfo endpoint. See Scopes and claims for more information on how scopes are requested and why scopes might (or might not) be available from the userinfo endpoint.

Authentication

This endpoint requires Bearer authentication. To use this authentication method, 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.

401

Error Message: Invalid_token. Typically occurs if you pass an invalid access token or if the access token has expired.

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"
}

Did this page help you?