Authentication and grants

Authorize an integration and understand how Pigeon checks tokens, scopes and record links.

On this page

Sign in on the web

On the Pigeon web app, choose Continue with Google or Continue with Apple. If you’re already signed in on your phone, open Settings → Connected apps → Manage on the web to arrive signed in. Use that handoff if you sign in with email and password on your phone.

Authorize an integration

Register your client and callback in Developers. Discover the endpoints from authorization server metadata. The API protected resource metadata identifies the resource as https://api.sendtopigeon.com/pigeon. Use that resource identifier for OAuth and https://api.sendtopigeon.com as the request base URL.

PurposeMethod and URL
Send the user to sign-in and consentGET https://auth.sendtopigeon.com/oauth2/authorize
Exchange a code or refresh a tokenPOST https://auth.sendtopigeon.com/oauth2/token
Revoke a refresh-token familyPOST https://auth.sendtopigeon.com/oauth2/revoke
  1. Generate a fresh state and PKCE verifier for the user's session. Send response_type=code, client_id, redirect_uri, state, the space-delimited scope, the API resource, code_challenge_method=S256 and the unpadded base64url SHA-256 hash of the verifier as code_challenge.
  2. Match the registered redirect URI exactly, including path and query. Register an HTTPS redirect on a DNS hostname you control. Public clients can also register a reverse-domain app scheme or an HTTP loopback URI on 127.0.0.1 or [::1]. When the loopback URI is registered without a port, the authorization request may add the listener port and must match the rest of the URI exactly. Use the same complete URI again at redemption. Register URIs without user credentials, wildcards or fragments.
  3. When the user returns, verify the callback's state and iss against the session and https://auth.sendtopigeon.com. Handle an OAuth error response before exchanging a code.
  4. Send a form-encoded token request with grant_type=authorization_code, the code, redirect_uri and the original code_verifier. A public client sends client_id in the body. A confidential client authenticates with HTTP Basic or with client_id and client_secret in the form. Use one client authentication method per request.

Send the resulting access token as Authorization: Bearer <access token>. Pigeon checks the account, client, connection (cnx) and current grant episode (gid). Reconnecting opens a fresh episode under the same connection.

Refresh, narrow or revoke access

CredentialLifetime
Authorization request10 minutes
Authorization code60 seconds, single use
OAuth access token10 minutes
Public client refresh token30 days unused, with a 365-day maximum for the family
Confidential client refresh token90 days unused, with the family ending when the grant episode ends

Refresh with grant_type=refresh_token and the current refresh_token at the token endpoint. Authenticate as you did for the code exchange. Save the replacement refresh token before another job can refresh. Serialize refreshes per grant. Reusing an already-rotated token returns invalid_grant and revokes that refresh-token family. Ask the user to authorize again if you lose access to the family. An optional scope can narrow the new access token within the refresh family's permissions.

To revoke a family, send its refresh token as token in a form-encoded request to the revocation endpoint with your client authentication. Revoking the last usable family ends the connection. Individual access tokens have their own expiry and cannot be revoked at this endpoint.

Pigeon intersects token scopes with the connection’s current permissions. After the user narrows access, stop using records that fall outside the grant. Start a fresh snapshot when the feed returns rebootstrap_required and replace the old mirror. After a disconnect, stop your sync and discard the old credentials. A reconnect requires a new snapshot and cursor.

A paused connection can still refresh a valid OAuth grant. API calls return HTTP 403 connection_paused until the user makes the connection active again. For hosted assistants, tool calls return pro_required after the account loses Pro. See what happens when Pro ends.

Use a personal access token

On Free or Pro, open Personal access tokens and choose Create token. Read and send scopes are selected by default. Select each write scope you need. Copy the token when it appears and use it as the bearer token in API requests.

You can have up to five active tokens. Each expires after 90 days by default and can last up to one year. On Free, all your tokens together count as your one live external connection. To end a token's access, choose Revoke beside it.

Choose scopes

Domain scopes such as workout:read cover the domain. Use a kind scope such as workout.workout:read to cover only that kind. A write scope includes the corresponding read access. References still require permission to read the target. The table lists the grantable integration scopes and their descriptions.

ScopePermission
event.event:readSee your saved events
event.event:writeCreate and change your saved events
event:readSee your saved events
event:writeCreate and change your saved events
guide.guide:readSee your saved guides
guide.guide:writeCreate and change your saved guides
guide:readSee your saved guides
guide:writeCreate and change your saved guides
media.media:readSee your saved media
media.media:writeCreate and change your saved media
media:readSee your saved media
media:writeCreate and change your saved media
note.link:readSee your saved links
note.link:writeCreate and change your saved links
note.note:readSee your notes
note.note:writeCreate and change your notes
note:readSee your notes and saved links
note:writeCreate and change your notes and saved links
place.place:readSee your saved places
place.place:writeCreate and change your saved places
place:readSee your saved places
place:writeCreate and change your saved places
product.product:readSee your saved products
product.product:writeCreate and change your saved products
product:readSee your saved products
product:writeCreate and change your saved products
profile:readSee your display name and email address
recipe.grocery_list:readSee your grocery lists
recipe.grocery_list:writeCreate and change your grocery lists
recipe.meal_plan:readSee your meal plans
recipe.meal_plan:writeCreate and change your meal plans
recipe.recipe:readSee your recipes
recipe.recipe:writeCreate and change your recipes
recipe:readSee your recipes, meal plans and grocery lists
recipe:writeCreate and change your recipes, meal plans and grocery lists
sends:createSend links and text to Pigeon and see the status and results of sends from this connection
workout.category:readSee your workout categories
workout.category:writeCreate and change your workout categories
workout.chart:readSee your training charts
workout.chart:writeCreate and change your training charts
workout.exercise:readSee your exercises
workout.exercise:writeCreate and change your exercises
workout.exercise_override:readSee your exercise customizations
workout.exercise_override:writeCreate and change your exercise customizations
workout.modifier:readSee your workout modifiers
workout.modifier:writeCreate and change your workout modifiers
workout.modifier_assignment:readSee your workout modifier assignments
workout.modifier_assignment:writeCreate and change your workout modifier assignments
workout.notice:readSee your workout notices
workout.notice:writeCreate and change your workout notices
workout.planned_workout:readSee your planned workouts
workout.planned_workout:writeCreate and change your planned workouts
workout.program:readSee your training programs
workout.program:writeCreate and change your training programs
workout.program_run:readSee your training program runs
workout.program_run:writeCreate and change your training program runs
workout.session:readSee your logged workouts
workout.session:writeCreate and change your logged workouts
workout.tag:readSee your workout tags
workout.tag:writeCreate and change your workout tags
workout.training_preferences:readSee your training preferences
workout.training_preferences:writeCreate and change your training preferences
workout.workout:readSee your workouts
workout.workout:writeCreate and change your workouts
workout.workout_version:readSee your workout versions
workout.workout_version:writeCreate and change your workout versions
workout:readSee your workouts, programs and logged sessions
workout:writeCreate and change your workouts, programs and logged sessions

With an OAuth access token or personal access token, use sends:create to submit links or text. File sends require a native Pigeon session.