Overriding OAuth credentials
Connect your customers through your own OAuth app: add its Client ID, Client Secret and scopes on the installed integration's Configuration tab.
Skip the reading — fast path for coding agents
truto environment-integrations show-override <id>
/skill truto-cli
Your customers then see your app's name on the provider's consent screen, and you choose the scopes it asks for. Check the provider's API documentation for the scopes it allows. The change applies to one environment.
Until the app is configured
Some integrations ship with no OAuth app of Truto's own — their client id is a placeholder until you supply yours here. Until you do, such an integration is left out of the Connect UI and the connections widget, and reauthorizing an existing account on it is refused with 400 and truto_error_code: app_credentials_not_configured when no other sign-in method can connect it (see Reauthorizing connections). Integrations where the end user types the client id on the connect form are not affected.
AWS STS integrations work the same way with their own toggle: Configuration tab → Use your own signing credentials, where you enter the IAM access key pair that signs AssumeRole. The API's refusal message calls both places Integration Settings.
Install an integration
The integration must be installed first; see Installing an integration.
Steps to Overriding OAuth
-
Click Integrations in the top navigation bar and select the integration.

-
Open the Configuration tab and turn on Use your own OAuth settings. Add the Redirect URL shown there to the OAuth app you created, then enter your Client ID, Client Secret and Scopes (if you need to define them) from that app. Client Secret stays disabled until you enter a Client ID. The fields accept placeholders, for example
{{environment_variables.client_secret}}.
Each field shows Revert to original once you change it: click it to go back to the catalog value for that field only, for example to keep your Client ID but use the default scopes. Turning Use your own OAuth settings off and saving removes your Client ID, Client Secret, scopes and redirect URL for this environment.
Accounts already connected keep tokens issued to the previous OAuth app. After you switch apps, their token refreshes fail and they move to needs_reauth. Plan the switch: reconnect those accounts through your app, or keep them on the previous app. If that app is yours, set its Client ID and Client Secret in each account's integration_override (credentials.oauth2.config.client) before you save the new app. If they connected through Truto's app, ask Truto support to keep them on it. The same applies when you change to a different Client ID later.
- Click Save, add an optional note for version history, and click Save again. The change applies to this environment only.
The Configuration tab has the same switch for other sign-in methods: Use your own Client Credentials settings for OAuth 2.0 Client Credentials, and Use your own signing credentials for JWT and AWS STS.
Use a redirect URL on your own domain
By default, the provider sends your users back to Truto's callback, for example https://api.truto.one/connect/hubspot/callback. Some providers show this URL on their consent screen, and some app reviews ask for a URL on your own domain. You can use your own URL instead, for each installed integration.
This works only for OAuth 2.0 integrations that use your own Client ID and Client Secret. Truto's OAuth app accepts only Truto's callback, so Truto will not save a custom redirect URL until you add your own credentials.
1. Add a redirect page on your domain
Your URL must send the browser on to Truto's callback with a redirect. Keep the query string exactly as it came in: the provider puts the code and state there, and Truto needs both.
- The URL must use
https. - The URL cannot have a
#fragment.
We recommend that you change only the domain, and keep Truto's path:
| URL | |
|---|---|
| Truto's callback | https://api.truto.one/connect/hubspot/callback |
| Your URL | https://auth.example.com/connect/hubspot/callback |
Then one redirect rule works for every integration: send the browser to api.truto.one with the same path and query string. When you add another integration later, you do not have to change the rule.
Truto's callback for each integration shows in the Redirect URL field.

Use a temporary redirect (302 or 307), so browsers do not cache it. For example:
location ~ ^/connect/[^/]+/callback$ {
return 302 https://api.truto.one$request_uri;
}# .htaccess or the site config
RewriteEngine On
RewriteRule ^/?connect/([^/]+)/callback$ https://api.truto.one/connect/$1/callback [R=302,L]# Caddyfile
@trutoCallback path_regexp ^/connect/[^/]+/callback$
redir @trutoCallback https://api.truto.one{uri} 302// Cloudflare Worker
export default {
fetch(request) {
const { pathname, search } = new URL(request.url)
if (!/^\/connect\/[^/]+\/callback$/.test(pathname)) {
return new Response('Not found', { status: 404 })
}
return Response.redirect(`https://api.truto.one${pathname}${search}`, 302)
},
}{
"redirects": [
{
"source": "/connect/:integration/callback",
"destination": "https://api.truto.one/connect/:integration/callback",
"permanent": false
}
]
}# _redirects
/connect/:integration/callback https://api.truto.one/connect/:integration/callback 302// next.config.js
module.exports = {
async redirects() {
return [
{
source: '/connect/:integration/callback',
destination: 'https://api.truto.one/connect/:integration/callback',
permanent: false,
},
]
},
}app.get('/connect/:integration/callback', (req, res) => {
res.redirect(302, `https://api.truto.one${req.originalUrl}`)
})On Vercel, the rule goes in vercel.json.
2. Register the URL in your OAuth app
In the provider's developer console, add your URL as an allowed redirect URL (it is sometimes called a callback URL) in your OAuth app. You can keep Truto's callback in the list too.
3. Set the URL in Truto
- Open the installed integration and turn on Use your own OAuth settings.
- Add your Client ID and Client Secret.
- In Redirect URL, replace
api.truto.onewith your domain. Keep the rest of the URL. - Click Save.

You can also set the URL in the install dialog and on the integration's Authentication tab.
If you enter a URL before you add your own Client ID, a Needs your own OAuth app warning shows, and Save is refused until you add one.

To go back to Truto's callback, click Revert to original under the field, or clear the field. Then click Save.
What changes
- Truto sends your URL on the authorize step and on the token exchange. Where the integration also sends a redirect URL when it refreshes a token, Truto sends yours there too.
- New connections and reconnections use your URL. Accounts that are already connected keep their tokens.
- The URL applies only to this environment. Other environments keep their own settings.
- OAuth 1.0 integrations always use Truto's callback.
Set the URL with the API
The URL is stored in the environment integration's override, at credentials.oauth2.config.params.redirect_uri (the authorize step) and credentials.oauth2.config.tokenParams.redirect_uri (the token exchange). Set both to the same URL, or the provider rejects the code.
PATCH /environment-integration/{id} replaces the whole override. So first get the environment integration, add the two keys to its override, and send the full override back. A Client Secret you leave out is kept as long as client.id doesn't change; send both when you add or change the Client ID.
{
"override": {
"credentials": {
"oauth2": {
"config": {
"client": { "id": "your-client-id", "secret": "your-client-secret" },
"params": {
"redirect_uri": "https://auth.example.com/connect/hubspot/callback"
},
"tokenParams": {
"redirect_uri": "https://auth.example.com/connect/hubspot/callback"
}
}
}
}
}
}The API does not check that the override has your own Client ID. Set one, or every connection fails with a redirect_uri_mismatch error.
Next
To change anything else about the integration in this environment, see Customising integrations. To see or roll back earlier versions of your settings, see See and restore earlier versions.