/register.
Services
How /register works
1
Member runs `/register` in Discord
The bot creates a signed OAuth context that includes the caller’s Discord user ID and the interaction ID.
2
Bot returns a private link button
The button points to the auth service
/oauth/anilist/start route using AUTH_SERVICE_BASE_URL.3
Auth service validates the context
The auth service verifies the context signature, creates a single-use OAuth state value, and redirects the browser to AniList.
4
AniList redirects back to the auth service
The auth service exchanges the authorization code, fetches the AniList viewer ID, and stores the linked credentials.
5
Bot commands can use the linked account
/whoami can show the linked profile, and media lookups can include member list status and score when that data is available.Shared values
These values matter across both services:Health endpoints
The bot process does not bind an HTTP listener; point operational health checks at the auth service.
What happens if the auth service is missing
The bot still owns the/register command, but full self-hosted account linking requires the auth service.
Because the bot loads OAuth configuration on startup, you should treat the auth service as part of the standard Annie Mei deployment rather than an optional add-on.
Next steps
- Set up the Bot service
- Set up the Auth service
- Review Environment Variables
