Skip to main content

Overview

Authentication tools handle user signup via OAuth 2.1 and session status checking.

init_signup

Initialize the signup flow for a new Arlo Health user.

Parameters

ParameterTypeRequiredDescription
baseUrlstringYesThe base URL for the MCP server (e.g., https://mcp.arlohealth.ai)
webhookUrlstringNoURL where Arlo will POST real-time notifications
webhookTokenstringNoBearer token for webhook request verification
deliveryContextobjectNoPlatform-specific delivery context for webhooks
conversationSessionKeystringNoYour platform’s session key for threading notifications

Returns

{
  "authUrl": "https://auth.arlohealth.ai/authorize?...",
  "sessionId": "sess_abc123...",
  "expiresIn": 900
}
FieldDescription
authUrlURL for user to click and complete signup
sessionIdSession identifier for polling status
expiresInSeconds until auth link expires (15 minutes)

Example

{
  "baseUrl": "https://mcp.arlohealth.ai",
  "webhookUrl": "https://your-agent.com/hooks/arlo",
  "webhookToken": "secret-token-123",
  "deliveryContext": {
    "to": "+15551234567",
    "channel": "whatsapp",
    "deliver": true
  },
  "conversationSessionKey": "conv_xyz789"
}

Webhook Setup

Pass webhook configuration during init_signup to receive real-time push notifications. You can also register or update webhooks after authentication using register_webhook.
See Webhooks for full webhook documentation.

check_account_status

Check authentication and webhook status for an Arlo session.

Parameters

ParameterTypeRequiredDescription
sessionIdstringNoSession ID from init_signup to poll for completion

Behavior

With sessionId: Polls for auth completion. Returns authenticated: false while pending, authenticated: true once complete. Without sessionId: Returns webhook status for all configured sessions and general authentication status.

Returns

{
  "authenticated": true,
  "status": "complete",
  "userName": "John Doe",
  "linkedAt": "2024-01-15T10:30:00Z",
  "sessionId": "sess_abc123",
  "webhookConfigured": true,
  "webhookUrl": "https://your-agent.com/hooks/arlo"
}
FieldDescription
authenticatedWhether the user is authenticated
statuspending or complete
userNameUser’s name (when authenticated)
linkedAtTimestamp when auth completed
sessionIdThe session identifier
webhookConfiguredWhether push notifications are set up
webhookUrlConfigured webhook URL (if any)
For detailed webhook status including all sessions, use get_webhook_status instead. See Webhooks.

Polling Pattern

async function waitForAuth(sessionId) {
  while (true) {
    const status = await checkAccountStatus({ sessionId });
    if (status.authenticated) {
      return status;
    }
    await sleep(2000); // Poll every 2 seconds
  }
}
Poll every 2-3 seconds while waiting for authentication to complete. The auth link expires after 15 minutes.