5 minutes to help shape OpenTodo. Anonymous, no account. Take the survey

App sign-in API

The OpenTodo app signs in through the system's authentication sheet (ASWebAuthenticationSession on iOS, a Custom Tab on Android) with an authorization code and PKCE (RFC 7636, S256 only).

Implementation notes

The OpenTodo app signs in through the system's authentication sheet (ASWebAuthenticationSession on iOS, a Custom Tab on Android) with an authorization code and PKCE (RFC 7636, S256 only). The sheet shares the browser's cookies and passkeys, so every sign-in method of the web app works, and a browser that is already signed in only confirms. It does not depend on the owner's AI assistants (MCP) switch. A server that has it says so in GET /api/v1/health with "app_sign_in": true.

POST /api/v1/app/sign-out

App sign out · Token or session

→ 204: ends the grant of the app token sent (signing out in the app); any other credential → 400 invalid_request

Response 200: OK

POST /api/v1/app/token

App token · No authentication

{grant_type: "authorization_code", code, code_verifier, state} or {grant_type: "refresh_token", refresh_token} → {access_token, token_type: "Bearer", expires_in: 3600, refresh_token, scope: "app"} with Cache-Control: no-store; the errors below

No authentication.

Request body
FieldTypeDescription
code requiredstring
code_verifier requiredstring
grant_type requiredstring
refresh_token requiredstring
state requiredstring
Response 200
FieldTypeDescription
access_token requiredstring
expires_in requirednumber
refresh_token requiredstring
scope requiredstring
token_type requiredstring

POST /api/v1/me/app-sign-in

Me app sign in · Session only

{query, allow} (the confirmation's answer; query is the sign-in request) → {redirect}: opentodo://signed-in with code and state on allow, with error=access_denied and state otherwise; recorded as mcp_oauth.granted with oauth_client_id opentodo-app

Needs a session; tokens are refused.

Request body
FieldTypeDescription
allow requiredboolean
query requiredstring
Response 200
FieldTypeDescription
redirect requiredstring

GET /api/v1/me/apps

List me apps · Token or session

{apps:[{id, device, createdAt, lastUsedAt}]}: the signed-in apps, most recently used first, shown with the sessions in Settings → Account

Response 200
FieldTypeDescription
apps requiredarray of object

DELETE /api/v1/me/apps/{id}

Delete a me app · Token or session

204: signs that app out; its next request gets 401; another person's or an unknown id → 404 not_found; recorded as mcp_oauth.revoked

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

This group in the HTTP API guide