The /userinfo Endpoint

Overview

The /userinfo endpoint provides information that is typically found in an OIDC flow via a JSON Web Token (JWT). Accessing this endpoint only requires your application to make a GET call to https://api.clever.com/userinfo and provide the SSO Bearer access_token as authentication. For more information on how to obtain an access_token in the OAuth flow, please see this page.

This endpoint is especially useful for apps with a Clever Library integration, where OIDC is not currently supported.

🚧

How can I view all roles for a user?

The /userinfo endpoint only displays the role of the current logged in user. If you need to view an exhaustive list of all roles associated with that user, you will need to make a call to /users/{id} using the SSO Bearer Token or District-App Token.

Example Query

curl -X GET "https://api.clever.com/userinfo" \
-H "Authorization: Bearer YOUR_SSO_BEARER_TOKEN" \
-H "Content-Type: application/json"

Example Response

{
    "sub": "64f0e2926b100a053fc08e14",
    "user_id": "64f0e2876b100a053fbf9c6e",
    "multi_role_user_id": "64f0e2926b100a053fc08e14",
    "user_type": "teacher",
    "district_id": "64ef5e6c8d6b17762d094e48",
    "district": "64ef5e6c8d6b17762d094e48",
    "email": "[email protected]",
    "name": {
        "first": "John-Paul",
        "last": "Johnson",
        "middle": ""
    },
    "schools": [],
    "given_name": "John-Paul",
    "family_name": "Johnson",
    "email_verified": false,
    "authorized_by": "district"
}

What’s Next