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.
| Purpose | Method and URL |
|---|---|
| Send the user to sign-in and consent | GET https://auth.sendtopigeon.com/oauth2/authorize |
| Exchange a code or refresh a token | POST https://auth.sendtopigeon.com/oauth2/token |
| Revoke a refresh-token family | POST https://auth.sendtopigeon.com/oauth2/revoke |
- Generate a fresh
stateand PKCE verifier for the user's session. Sendresponse_type=code,client_id,redirect_uri,state, the space-delimitedscope, the APIresource,code_challenge_method=S256and the unpadded base64url SHA-256 hash of the verifier ascode_challenge. - 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.1or[::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. - When the user returns, verify the callback's
stateandissagainst the session andhttps://auth.sendtopigeon.com. Handle an OAutherrorresponse before exchanging a code. - Send a form-encoded token request with
grant_type=authorization_code, the code,redirect_uriand the originalcode_verifier. A public client sendsclient_idin the body. A confidential client authenticates with HTTP Basic or withclient_idandclient_secretin 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
| Credential | Lifetime |
|---|---|
| Authorization request | 10 minutes |
| Authorization code | 60 seconds, single use |
| OAuth access token | 10 minutes |
| Public client refresh token | 30 days unused, with a 365-day maximum for the family |
| Confidential client refresh token | 90 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.
| Scope | Permission |
|---|---|
event.event:read | See your saved events |
event.event:write | Create and change your saved events |
event:read | See your saved events |
event:write | Create and change your saved events |
guide.guide:read | See your saved guides |
guide.guide:write | Create and change your saved guides |
guide:read | See your saved guides |
guide:write | Create and change your saved guides |
media.media:read | See your saved media |
media.media:write | Create and change your saved media |
media:read | See your saved media |
media:write | Create and change your saved media |
note.link:read | See your saved links |
note.link:write | Create and change your saved links |
note.note:read | See your notes |
note.note:write | Create and change your notes |
note:read | See your notes and saved links |
note:write | Create and change your notes and saved links |
place.place:read | See your saved places |
place.place:write | Create and change your saved places |
place:read | See your saved places |
place:write | Create and change your saved places |
product.product:read | See your saved products |
product.product:write | Create and change your saved products |
product:read | See your saved products |
product:write | Create and change your saved products |
profile:read | See your display name and email address |
recipe.grocery_list:read | See your grocery lists |
recipe.grocery_list:write | Create and change your grocery lists |
recipe.meal_plan:read | See your meal plans |
recipe.meal_plan:write | Create and change your meal plans |
recipe.recipe:read | See your recipes |
recipe.recipe:write | Create and change your recipes |
recipe:read | See your recipes, meal plans and grocery lists |
recipe:write | Create and change your recipes, meal plans and grocery lists |
sends:create | Send links and text to Pigeon and see the status and results of sends from this connection |
workout.category:read | See your workout categories |
workout.category:write | Create and change your workout categories |
workout.chart:read | See your training charts |
workout.chart:write | Create and change your training charts |
workout.exercise:read | See your exercises |
workout.exercise:write | Create and change your exercises |
workout.exercise_override:read | See your exercise customizations |
workout.exercise_override:write | Create and change your exercise customizations |
workout.modifier:read | See your workout modifiers |
workout.modifier:write | Create and change your workout modifiers |
workout.modifier_assignment:read | See your workout modifier assignments |
workout.modifier_assignment:write | Create and change your workout modifier assignments |
workout.notice:read | See your workout notices |
workout.notice:write | Create and change your workout notices |
workout.planned_workout:read | See your planned workouts |
workout.planned_workout:write | Create and change your planned workouts |
workout.program:read | See your training programs |
workout.program:write | Create and change your training programs |
workout.program_run:read | See your training program runs |
workout.program_run:write | Create and change your training program runs |
workout.session:read | See your logged workouts |
workout.session:write | Create and change your logged workouts |
workout.tag:read | See your workout tags |
workout.tag:write | Create and change your workout tags |
workout.training_preferences:read | See your training preferences |
workout.training_preferences:write | Create and change your training preferences |
workout.workout:read | See your workouts |
workout.workout:write | Create and change your workouts |
workout.workout_version:read | See your workout versions |
workout.workout_version:write | Create and change your workout versions |
workout:read | See your workouts, programs and logged sessions |
workout:write | Create 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.