Teitunnel

Reference

Permissions and scopes

Every Cloudflare permission and OAuth scope Teitunnel asks for, whether routes need it, and which features use it.

Teitunnel connects to a Cloudflare account with an API token or by signing in with Cloudflare. Either way it asks for the permissions below: the required ones are what routes need; the optional ones are only used by the feature next to them, and everything else keeps working without them. When a feature needs one the account's credential lacks, it says which to add and checks again when you come back (Accounts and permissions).

Settings ▸ Accounts ▸ Permissions shows what the connected credential can do. The permissions with Yes under Checked are tested there without changing anything; the others show up when Cloudflare refuses a change.

Required

PermissionToken link keyOAuth scopeUsed forChecked
Account · Cloudflare Tunnel · Editargotunnelargotunnel.writeCreating and running tunnels, routes, shares on your domains, private networks with a token, connector logs.Yes
Zone · DNS · Editdnsdns.writeThe DNS records of routes, shares on your domains and reservations (per domain).Yes
Zone · Zone · Readzonezone.readListing your domains.Yes
Account · Account Settings · Readaccount_settingsaccount-settings.readFinding and naming the accounts a credential reaches.No

Optional

PermissionToken link keyOAuth scopeUsed forChecked
Account · Access: Apps and Policies · Editaccessaccess-app.write, access-policy.write, zone-access.writeLogins in front of routes, shares and Snapshots (--allow).Yes
Account · Access: Organizations, Identity Providers, and Groups · Editaccess_acctaccess-acct.writeLogins: adding the one-time code login method when the account has none.Yes
Zone · Analytics · Readanalyticsanalytics.readTraffic charts per route and teitunnel analytics.Yes
Account · Account Analytics · Readaccount_analyticsaccount-analytics.readTraffic numbers Cloudflare keeps per account.No
Account · Workers Scripts · Editworkers_scriptsworkers-scripts.writeSnapshots, offline pages and webhook inboxes (Workers on your account).Yes
Zone · Workers Routes · Editworkers_routesworkers-routes.writeA hostname on your domain for a Snapshot, an offline page or an inbox (per domain).Yes
Zone · Zone WAF · Editzone_wafzone-waf.writeEdge protection: bot and AI crawler rules, rate limits.Yes
Zone · Transform Rules · Editzone_transform_ruleszone-transform-rules.writeEdge protection: request and response header rules.Yes
Zone · Cache Rules · Editcache_settingscache-settings.writeEdge protection: bypassing Cloudflare's cache for a hostname (a dev server's changing assets).Yes
Account · Access: Service Tokens · Editaccess_service_tokenaccess-service-token.writeService tokens that let machines through a login (teitunnel service-token).Yes
Account · D1 · Editd1d1.writeSnapshot comments and webhook inboxes (a D1 database on your account).Yes
Account · Load Balancing: Monitors and Pools · Editnot in the linkload-balancing-monitors-and-pools.writeLoad balancing a route across machines (a paid add-on).No
Zone · Load Balancers · Editnot in the linkload-balancers.writeLoad balancing a route across machines (a paid add-on).No

Only when signing in with Cloudflare

A sign-in also asks for these scopes, which have no permission of their own in an API token.

OAuth scopeUsed for
teams-networks.writePrivate networks (with an API token, Cloudflare Tunnel · Edit covers them).
teams.readThe Doctor's WARP checks (read only).
offline_accessKeeping the sign-in (a refresh token).

Every optional scope can be declined on Cloudflare's consent screen; the feature that needs it then asks for it again.

Open Cloudflare in Settings ▸ Accounts ▸ Connect an Account opens the dashboard's Create API token page with these permissions selected, for all your accounts and domains:

https://dash.cloudflare.com/profile/api-tokens?permissionGroupKeys=%5B%7B%22key%22%3A%22argotunnel%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22dns%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22account_settings%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22access%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22access_acct%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22account_analytics%22%2C%22type%22%3A%22read%22%7D%2C%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_routes%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_waf%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone_transform_rules%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22access_service_token%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22d1%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22cache_settings%22%2C%22type%22%3A%22edit%22%7D%5D&accountId=*&zoneId=all&name=Teitunnel

Load balancing isn't in the link, because it's a paid add-on: add its two permissions to the token if you use it. Cloudflare ignores keys it doesn't know without saying so, so if Cloudflare Tunnel · Edit is missing from the page it opens, add it by hand.

Edit on GitHub

Last updated on

On this page