Overview
User endpoints manage authentication sessions, user profiles, and account data. Most user operations are handled through OAuth flows documented in Authentication.List Users
Number of users per page
Number of users to skip
Unique user ID (ULID)
User email address
User display name
User kind:
standard, adminID of user’s individual profile (if created)
GitHub username (if connected)
Bluesky handle (if connected)
X/Twitter handle (if connected)
Get User by ID
User ID (ULID)
Authentication Endpoints
See Authentication for complete OAuth flow documentation.Initiate OAuth Login
OAuth provider:
github, apple, bsky, x, youtube, linkedinURL to redirect to after authentication
OAuth Callback (GET)
OAuth Callback (POST)
response_mode=form_post).
Authorization code from provider
OAuth state parameter
Apple-specific user info (JSON string, first auth only)
Refresh Token
Bearer token to refresh
New JWT token
Token expiration timestamp (Unix epoch)
Logout
After logout, a new anonymous session is created automatically and set in the session cookie. The old JWT token is invalidated.
Session Management
Session Types
Anonymous Session
Created automatically for all visitors. Stores locale preferences and temporary data.
Authenticated Session
Created after OAuth login. Links to user account and individual profile.
Session Status
- active - Currently valid session
- logged_out - User explicitly logged out
- expired - Session exceeded TTL (365 days)
- terminated - Manually terminated (e.g., from another device)
Session Cookie
Authenticated sessions set a cookie for same-domain requests:- Name:
aya_session - Domain:
.aya.is - Path:
/ - Secure:
true(HTTPS only) - SameSite:
Lax - HttpOnly:
true - Max-Age: 365 days
Cross-Domain Authentication
For cross-domain requests (e.g., custom domains), use the JWT token in theAuthorization header:
OAuth Providers
GitHub
- Scopes:
read:user,user:email,public_repo,read:org - User data: email, name, avatar, username
- Auto-creates: Managed GitHub profile link
Apple
- Scopes:
name,email - User data: email, name (first auth only)
- Flow: POST callback with
response_mode=form_post
Bluesky
- User data: handle, display name, avatar
- Requires: Bluesky account
X/Twitter
- Scopes:
tweet.read,users.read,offline.access - User data: handle, name, profile picture
YouTube
- Scopes:
youtube.readonly - User data: channel info
- Used for: Profile link integration
- Scopes:
openid,profile,email - User data: email, name
- Used for: Login and profile links
Security
User Kinds
Standard User
Default user type with access to:- Create ONE individual profile
- Create unlimited organization/product profiles
- Join communities as member
- Create stories and discussions
Admin User
Elevated privileges:- Access admin endpoints
- Manage all profiles and content
- Trigger system operations (e.g., bulletin processing)
- View all user data
Admin status is set at the database level and cannot be changed via API.