Sprites Docs
Guides

OAuth Integrations

Access Gmail, Calendar, and other user services from your superpowers.

Some operations access user data that requires explicit authorization. When your superpower uses Gmail, Google Calendar, or fitness services, the user is prompted to connect their account.

Declaring OAuth requirements

Add oauth_required to your action:

actions:
  - id: check_email
    oauth_required: [gmail]
    operations:
      - type: gmail_search
        output: emails
        query: "is:unread from:boss@company.com"
        max_results: 5
    response:
      template: "You have {{$op.emails | length}} unread emails from your boss."

Available OAuth scopes

ScopeOperationsWhat it accesses
gmailgmail_searchSearch and read user's Gmail
calendarcalendar_queryRead Google Calendar events
stravahttp_request with auth_token_ref: stravaStrava fitness data
whoophttp_request with auth_token_ref: whoopWHOOP recovery data
ourahttp_request with auth_token_ref: ouraOura Ring sleep data
spotifyhttp_request with auth_token_ref: spotifySpotify listening data

A provider's token is only ever sent to that provider's own API domains — a request that would route a token anywhere else is blocked.

User experience

When a user triggers a superpower that requires OAuth:

  1. The superpower detects missing authorization
  2. The persona (Luna, etc.) sends a friendly message with a connect link
  3. The user clicks the link and authorizes in their browser
  4. Next time they trigger the superpower, it works

Users can also connect proactively by name — "connect my calendar", "connect spotify". Any supported provider resolves this way (Google services resolve as the calendar / gmail scopes; every other provider by its name), so a superpower using a newer provider doesn't need any special connect handling.

Combining scopes

A single action can require multiple scopes:

actions:
  - id: morning_briefing
    oauth_required: [gmail, calendar]
    operations:
      - type: calendar_query
        output: events
        time_min: today
        time_max: "+1d"

      - type: gmail_search
        output: urgent_emails
        query: "is:unread is:important"
        max_results: 3

      - type: llm_generate
        output: briefing
        prompt: "Morning briefing: {{$op.events | length}} events today, {{$op.urgent_emails | length}} urgent emails..."

On this page