Skip to content

User info

Request

Returns the identity claims of the authenticated user based on the scopes granted during authorisation.

The response includes standard OpenID Connect claims such as name, email, phone number, and address, as well as the user's Class profile which contains their business-level role and business details.

The claims returned depend on the scopes requested during the OAuth authorisation flow:

  • openid — returns the sub (subject identifier).
  • profile — returns name, given_name, family_name, middle_name, and gender.
  • email — returns email.
  • phone — returns phone_number.
  • address — returns the address object.
  • class_profile — returns the class_profile object containing the user's Class role and business details.
Security
Class_oAuth(Required scopes: openid)
curl -i -X GET \
  https://api.class-pie.com.au/api/1.0/u/connect/userinfo \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success (Ok)

Bodyapplication/json
substring

The unique subject identifier for the user.

Example:"007e9c1e-1be8-408b-b538-866cad6d3d09"
emailstring, (email)

The user's email address. Returned when the email scope is granted.

Example:"test.user@class.com.au"
namestring

The user's full display name including title.

Example:"Mr Test User"
given_namestring

The user's first name.

Example:"Test"
family_namestring

The user's last name.

Example:"User"
middle_namestring

The user's middle name.

Example:"Test"
genderstring

The user's gender.

Example:"male"
phone_numberstring

The user's phone number. Returned when the phone scope is granted.

Example:"0292783354"
addressobject

The user's physical address. Returned when the address scope is granted.

class_profileobject

The user's Class-specific profile information including their business role and business details. Returned when the class_profile scope is granted.

Response
{ "sub": "007e9c1e-1be8-408b-b538-866cad6d3d09", "email": "test.user@class.com.au", "name": "Mr Test User", "given_name": "Test", "family_name": "User", "middle_name": "Test", "gender": "male", "phone_number": "0292783354", "address": { "street_address": "238 Pitt Street", "locality": "Sydney", "region": "NSW", "postal_code": "2000", "country": "au" }, "class_profile": { "class_role": "Access Controller", "business_name": "Sample Business", "business_code": "BUSINESS", "business_address": { "street_address": "238 Pitt Street", "locality": "Sydney", "region": "NSW", "postal_code": "2000", "country": "au" }, "business_phone_number": "0292783354" } }