{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-products/nowinfinity/resources/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"UserInfo Endpoint","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"userinfo-endpoint","__idx":0},"children":["UserInfo Endpoint"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This page details the use of the Class UserInfo endpoint to obtain information about Class users. This information can be used to bootstrap account creation for integrations that use Class as an Identity Provider for user authentication."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"required-scopes","__idx":1},"children":["Required Scopes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In order to make a UserInfo request, you must obtain an access token with an appropriate set of permissions. At a minimum, the access token scope must include ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OpenID"]}," to be able to make UserInfo requests."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following scope values determine what information is included in UserInfo responses:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["openid"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["address"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class_profile"]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," For a detailed description of these values, please refer to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/class/resources/authorisation-scopes"},"children":["Authorisation scopes"]}," page."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"userinfo-request","__idx":2},"children":["UserInfo Request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once you have obtained an access token with appropriate permissions, you can obtain information about the authorizing user by making a UserInfo request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Requests are made via an HTTP GET request to the UserInfo endpoint. The URI of this endpoint should be obtained dynamically from the userinfo_endpoint field of the Discovery document."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The request requires the access token to be sent as a Bearer token in the Authorisation header during an API request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["There are no parameters for the request."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example UserInfo request:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api.class.com.au/api/1.0/u/connect/userinfo\nAuthorization: Bearer PGNsaWVudF9pZD46PGNsaWVudF9zZWNyZXTvu78+\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"userinfo-response","__idx":3},"children":["UserInfo Response"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The UserInfo response contains information about the authorizing user encoded as a JSON object. The exact set of properties will depend on both the scope of the access token used in the request and what data has been entered in Class. The only property that is guaranteed to be present is the sub (subscriber) property, which uniquely identifies the user."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following Standard Claims will be included in the response if the access token has the appropriate scope, and the corresponding data has been entered in Class:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sub"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["given_name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["middle_name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["family_name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gender"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone_number"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["address"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following additional claims will be included in the access token scope includes class_profile:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business_name"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business_code"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business_phone_number"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["business_address"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class_role"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An example UserInfo response, with white space added for readability:"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example UserInfo response:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"HTTP/1.1 200 OK\nDate: Fri, 10 Jul 2015 03:23:41 GMT\nCache-Control: no-store, must-revalidate, no-cache, max-age=0\nContent-Type: application/json; charset=utf-8\nContent-Length: 590\n \n{\n    \"sub\" : \"007e9c1e-1be8-408b-b538-866cad6d3d09\",\n    \"email\" : \"test.user@class.com.au\",\n    \"name\" : \"Mr Test User\",\n    \"given_name\" : \"Test\",\n    \"family_name\" : \"User\",\n    \"middle_name\" : \"Test\",\n    \"gender\" : \"male\",\n    \"phone_number\" : \"0292783354\",\n    \"address\" : {\n        \"street_address\" : \"238 Pitt Street\",\n        \"locality\" : \"Sydnet\",\n        \"region\" : \"NSW\",\n        \"postal_code\" : \"2000\",\n        \"country\" : \"au\"\n    },\n    \"class_profile\" : {\n        \"class_role\" : \"Access Controller\",\n        \"business_name\" : \"Sample Business\",\n        \"business_code\" : \"BUSINESS\",\n        \"business_address\" : {\n            \"street_address\" : \"238 Pitt Street\",\n            \"locality\" : \"Sydnet\",\n            \"region\" : \"NSW\",\n            \"postal_code\" : \"2000\",\n            \"country\" : \"au\"\n        },\n        \"business_phone_number\" : \"0292783354\"\n    }\n}\n","lang":"http"},"children":[]}]},"headings":[{"value":"UserInfo Endpoint","id":"userinfo-endpoint","depth":1},{"value":"Required Scopes","id":"required-scopes","depth":2},{"value":"UserInfo Request","id":"userinfo-request","depth":2},{"value":"UserInfo Response","id":"userinfo-response","depth":2}],"frontmatter":{"seo":{"title":"UserInfo Endpoint"}},"lastModified":"2025-11-13T12:04:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/nowinfinity/resources/userinfo-endpoint","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}