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 thesub(subject identifier).profile— returnsname,given_name,family_name,middle_name, andgender.email— returnsemail.phone— returnsphone_number.address— returns theaddressobject.class_profile— returns theclass_profileobject containing the user's Class role and business details.
Security
Class_oAuth(Required scopes: openid)
- Partner Integration Environment (Sandbox)https://api.class-pie.com.au/api/1.0/u/connect/userinfo
- Production Environmenthttps://api.class.com.au/api/1.0/u/connect/userinfo
curl -i -X GET \
https://api.class-pie.com.au/api/1.0/u/connect/userinfo \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Success (Ok)
The user's email address. Returned when the email scope is granted.
Example:"test.user@class.com.au"
The user's phone number. Returned when the phone scope is granted.
Example:"0292783354"
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" } }