OperateGovernance

Access tokens

This page is for project admins who decide whether their application can read the OAuth access tokens of the users who connect through Arcade.

Arcade holds every user’s access token and gives it to the that need it when they run. The Access tokens setting decides whether your application can also read those tokens through the API. Leave it off unless your application must call a provider’s API itself.

Returning access tokens hands control of your users’ connected accounts to every API key in the project that can call tools. Anyone holding one of those keys can read the token of every user who connected an and act as that at the provider, outside Arcade. Arcade can’t see, limit, audit, or stop what they do with it. If one key leaks, every connected account is exposed.

What the setting does

SettingWhat your application gets from a completed authorization
Keep tokens in ArcadeThe status and user info. A request that asks for the token is refused.
Return tokens to your appThe same, plus the user’s token in context.token when the request sends include_token=true.

Either way, that run through Arcade receive the ’s token. The setting only changes what your application can read.

  • New keep tokens in Arcade.
  • Projects created before access tokens became a setting return them, so applications that already read tokens keep working once they send include_token=true. Check whether yours still needs them, and switch to Keep tokens in Arcade if not.

When to turn it on

Return tokens only when your application calls a provider’s API directly with the ’s token, as in Call third-party APIs, and running that call as an Arcade isn’t an option.

Keep tokens in Arcade when:

  • Your only call through Arcade, including your own custom tools. Tools get the token without this setting.
  • You hand to or to systems you don’t fully control.
  • You no longer need the tokens. Turn the setting off as soon as that’s true.

If you do turn it on, limit who can read tokens:

  • Give the code that reads tokens its own executor key, and give every other system a key that can’t call tools. See API key roles.
  • Deactivate any key you suspect has leaked, and revoke the affected ’ grants at the provider.

Change the setting

Only a admin signed in to the Dashboard can change the setting. An can read it but can’t change it, so a leaked key can’t turn token return on.

Open Auth settings

In the Arcade Dashboard (opens in new tab), go to the and open Auth settings under Connections.

Choose who holds the tokens

Under Access tokens, choose Keep tokens in Arcade or Return tokens to your app, then click Save.

Confirm

Returning tokens asks you to confirm that a leaked can expose every connected ’s token. Check the box and click Return tokens.

While the returns tokens, the Connected and OAuth providers pages show a warning that links back to this setting.

Every change is recorded in the audit log.

What happens when you turn it off

  • Requests that ask for a token are refused with 403 and the error access_tokens_disabled.
  • Tokens your application already received are not cleared. They stay valid at the provider until they expire or the ’s grant is revoked there.
  • that run through Arcade keep working.

How applications read a token

A completed authorization carries the token only when both of these hold:

  • The returns access tokens.
  • The request sends include_token=true. Without it, the response carries no token in any .

The request must use an that can call . A platform manager key is refused with 403. Call third-party APIs shows the call in Python, JavaScript, and Java.

Last updated on

On this page