Documentation Index
Fetch the complete documentation index at: https://docs.arlohealth.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Arlo Health uses OAuth 2.1 with PKCE (Proof Key for Code Exchange) for authentication. This provides secure authentication without requiring the agent to handle user credentials.OAuth 2.1 Flow
Discovery Endpoints
Arlo exposes standard OAuth 2.1 discovery endpoints:| Endpoint | Purpose |
|---|---|
/.well-known/mcp.json | MCP Server Card with capabilities and auth info |
/.well-known/oauth-protected-resource | RFC 9728 protected resource metadata |
/.well-known/oauth-authorization-server | OAuth authorization server metadata |
MCP Server Card
OAuth Authorization Server Metadata
Authentication Flow
Step 1: Initialize Signup
Callinit_signup to begin the OAuth flow:
Step 2: User Completes Auth
Direct the user to openauthUrl in their browser. They will:
- Create an account or sign in
- Grant permissions to your agent
- Be redirected back to Arlo
Step 3: Poll for Completion
Pollcheck_account_status until authentication completes:
The auth link expires after 15 minutes. If the user doesn’t complete authentication, you’ll need to call
init_signup again.Scopes
| Scope | Description | Required |
|---|---|---|
openid | OpenID Connect identifier | Yes |
profile | User profile information | Yes |
email | User email address | Yes |
offline_access | Refresh tokens for long-lived sessions | Recommended |
Token Management
Access Tokens
- Short-lived (typically 1 hour)
- Include in requests as
Authorization: Bearer <token> - Automatically managed by MCP clients
Refresh Tokens
- Long-lived (days/weeks)
- Use to obtain new access tokens
- Requires
offline_accessscope
Token Refresh Flow
Webhook Registration
The best time to register webhooks is duringinit_signup:
Session Management
Session Persistence
- Sessions are tied to the user’s Arlo account
- Sessions persist until explicitly revoked
- Webhook registrations are permanent per session
Re-authentication
If a session expires:- Call
init_signupagain - User completes OAuth flow
- New session is created
- Re-register webhooks if needed
Checking Session Status
Usecheck_account_status without a sessionId to check the current session:
Security Best Practices
Webhook Token Security
- Use cryptographically random tokens
- Store tokens securely (environment variables, secrets manager)
- Rotate tokens periodically
- Always validate tokens on incoming webhooks
PKCE Requirements
- Always use
S256code challenge method - Generate cryptographically random code verifiers
- Never reuse code verifiers
Error Handling
Common Authentication Errors
| Error | Cause | Resolution |
|---|---|---|
not_authenticated | No valid session | Call init_signup |
token_expired | Access token expired | Refresh token |
invalid_grant | Refresh token invalid | Re-authenticate |
session_revoked | User revoked access | Re-authenticate |