When should you use an OAuth app?
Use an OAuth app to work with the signed-in member’s own notes, and an API key to work without a user.
OAuth apps support only the Authorization Code flow with PKCE. There is no
client_credentials flow for getting a token without a user, so use an API key for server-to-server integrations.
How does the flow work?
Your app sends the user to the Tiro authorization page for consent, exchanges the returned authorization code for an access token on your server, and then calls the API. When the access token expires, you get a new one with the refresh token.Step 1. Register an OAuth app
An organization Admin or Developer registers the app at Tiro Platform. OAuth apps can be registered only at the organization level.1
Open the OAuth apps screen
In the Tiro Platform side menu, open your organization’s [OAuth apps] menu and click [Register OAuth app].
2
Enter the app details
Enter the app name, Redirect URIs (1 to 10), and the scopes to request from users. See the table below for Redirect URI rules.
3
Store the Client ID and Client Secret
Right after registration, the screen shows the Client ID and Client Secret. The Client Secret is shown only this once. Store it right away somewhere safe, such as a server environment variable.
Redirect URI rules
A Redirect URI must be an absolute URL that starts withhttps://, and the redirect_uri in an authorization request must exactly match one of the registered values.
Registering separate apps for local development and production keeps development URLs out of production settings.
The [OAuth apps] menu also appears on workspace screens, but you can open it only after switching to your organization. If you don’t see the menu, contact your account manager or partners@theplato.io and we’ll issue an app for you.
Scopes you can request
An OAuth app can request only the scopes in the table below. Organization management scopes (organization_member:*, workspace:*, session:write) can’t be delegated and require an organization API key. word_memory:write, voice_file_job:*, and realtime_transcription:* also can’t be delegated through OAuth, so they’re available to API keys only.
Each
write scope includes read for the same resource.
What the app can actually reach is the overlap between the scopes the user consented to and the permissions that user holds in Tiro. On the consent screen, the user can downgrade or remove permissions for each resource, so check scope in the token response to see which scopes you actually received. The app can’t read workspaces or notes the user can’t see.
Step 2. Get user consent
Send the user from your app to the Tiro authorization page. Before sending the authorization request, generate two PKCE values.
After the user signs in with their Tiro account, reviews the app name and requested scopes on the consent screen, and approves,
code and state come back to your Redirect URI. If the user declines, error=access_denied and state come back. If the authorization screen stays open for more than 10 minutes, the user has to start over.
What do you check on the callback?
Checkstate before you exchange the token. Store the value you generated for the authorization request in the user’s session, compare it with the value that comes back on the callback, then clear the stored value. If it’s missing or doesn’t match, stop the request there.
Skipping this check opens you to login CSRF: an authorization started by an attacker gets attached to the victim’s session, linking the victim to an account they don’t know about.
Members of organizations using SSO sign in through their corporate IdP as usual before they see the consent screen. Consent applies to that member’s Tiro account, and the app gets only that account’s permissions.
Step 3. Exchange the code for a token
Turn the validatedcode into an access token on your server. Client authentication supports HTTP Basic only (the Client ID and Client Secret in Authorization: Basic). The examples below read the callback’s authorization code and the code_verifier from step 2 from environment variables. Handle the Client Secret on the server only, and never put it in browser or app code. An authorization code is single-use and expires 5 minutes after it’s issued. If you send it twice or after 5 minutes, Tiro rejects it with invalid_grant.
expires_in is the remaining lifetime in seconds. Every app registered in Tiro Platform receives a refresh_token, and its access token is valid for 1 hour. A few apps registered before refresh tokens were supported receive a 180-day token without a refresh_token instead. Those apps can send the user back to the authorization page before the token expires. Don’t hardcode the lifetime. Use the value in the response.Step 4. Call the API
Put the access token in theAuthorization header the same way you would an API key. The available endpoints and response formats are the same as in the API Overview.
$TIRO_WORKSPACE_GUID, use a guid from the GET /v1/external/workspaces response.
The response includes the notes the consenting user can see in the app, the same result you’d get with that user’s account API key.
Step 5. Refresh the token
If the token exchange response includes arefresh_token, you can get a new access token without asking the user to consent again.
invalid_grant and you have to ask the user to consent again. If the app was discarded, refreshes are rejected with 401 invalid_client instead of invalid_grant.
Disconnect
When a user stops using the app, revoke the refresh token from your app server to disconnect. Access tokens already issued expire onceexpires_in passes. Tiro has no screen where users disconnect apps themselves, so provide a disconnect option in your app. Discarding an OAuth app in Tiro Platform also disconnects every user connection made through that app.
Where can you check the supported methods?
The endpoints and supported methods are published in the standard metadata document. The metadata also lists methods for MCP clients. OAuth apps use the methods described on this page (HTTP Basic client authentication andS256 PKCE).
How do you fix OAuth errors?
Use theerror value and HTTP status in the error response to find the cause.
Related pages: Authentication, Integrate at the organization level, API Overview