Overview
The userinfo endpoint returns information about the user associated with the access token. This endpoint requires theemail or openid scope.
Important: Auth Agent provides only the user’s email address to websites for account matching. No name or username is sent. Websites should use email as the primary identifier to match agents to user accounts.
Authentication
Requires a valid access token withemail or openid scope.
Response
Success (200 OK)
Agent ID (subject identifier)
User’s email address (only included if
email or openid scope was granted). This is the primary identifier for matching agents to user accounts. Only email is provided - no name or username is sent.Error (401 Unauthorized)
Example Requests
Integration Scenarios
The/userinfo endpoint is crucial for implementing different integration patterns:
Scenario 1: Full Account Access
Use the email to identify the user’s existing account and give the agent full access:Scenario 2: Contextual Profile
Create a separate agent profile but link it to the user’s account for context access:Scenario 3: Fresh Profile
Do not call/userinfo - create a fresh agent profile with no user context:
Learn More
Complete guide to integration scenarios with visual diagrams
Scope Requirements
The information returned depends on the scopes granted:| Scope | Fields Returned |
|---|---|
| None | Only sub |
email or openid | sub, email (only email is provided - no name or username) |
profile | Currently same as email |
Security Considerations
Access tokens expire after 1 hour. Implement token refresh logic to maintain access.
