Avnology ID
API ReferenceOAuth 2.1 / OIDC

UserInfo Endpoint

Retrieve the authenticated user's profile claims using an OAuth access token.

Endpoint

GET /userinfo

Base URL: https://api-id.avnology.net

Authentication: Bearer access token with openid scope

Returns the user's profile claims based on the scopes granted to the access token.

Request

curl https://api-id.avnology.net/userinfo \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiI..."

Response

Success (200 OK)

{
  "sub": "usr_4f18acec-2712-4be7-a9af-b063b4f6deba",
  "email": "[email protected]",
  "email_verified": true,
  "name": "Jane Smith",
  "given_name": "Jane",
  "family_name": "Smith",
  "preferred_username": "janesmith",
  "picture": "https://cdn.id.avnology.net/avatars/usr_4f18acec.jpg",





Claims returned depend on the scopes:

ScopeClaims
openidsub
profilename, given_name, family_name, preferred_username, picture, locale, zoneinfo, updated_at
emailemail, email_verified
phonephone_number, phone_number_verified

Errors

StatusCodeDescription
401AVNOLOGY_AUTH_205Access token expired
401AVNOLOGY_AUTH_206Token revoked
403AVNOLOGY_AUTH_101Missing openid scope

Code Examples

JavaScript (fetch)

async function getUserInfo(accessToken) {
  const response = await fetch('https://api-id.avnology.net/userinfo', {
    headers: { 'Authorization': `Bearer ${accessToken}` },
  });
  return response.json();
}

Python (httpx)

import httpx

def get_user_info(access_token: str) -> dict:
    return httpx.get("https://api-id.avnology.net/userinfo",
        headers={"Authorization": f"Bearer {

Go (net/http)

func getUserInfo(ctx context.Context, accessToken string) (*UserInfoResponse, error) {
	req, _ := http.NewRequestWithContext(ctx, 









  • Token Endpoint -- obtain access tokens
  • Discovery -- find the userinfo endpoint URL
  • SDK: client.oauth.getUserInfo() (TypeScript)