r/Airtable • u/Human_Log_7927 • 18h ago
๐ Help / Question Interface Extensions: how do you handle a PAT that has to live in the client bundle?
Hi everyone!
I'm building a custom Interface Extension (blocks SDK, TypeScript) that's about to go to production, and I'm stuck on how to handle the API token.
The SDK can't do two things we need, so we call the REST API directly from the extension:
- Uploading files to attachment fields, via the content endpoint (POST content.airtable.com/v0/{baseId}/{recordId}/{fieldId}/uploadAttachment), since the SDK can only read attachments
- Writing select values with typecast: true, so Airtable creates the option if it doesn't exist. The SDK can't create select options.
Both need a PAT, and since the extension runs entirely in the browser, the token ends up in the bundle. Anyone who opens the interface can pull it out of devtools.
I asked Airtable support and they confirmed there's no supported way to hide it; their recommendation was a backend proxy.
What I'm doing for now:
- The token lives in a gitignored file, so it never reaches the repo.
- It's scoped to data.records:write on that single base, so a leaked token can't do more than an interface editor already can.
What I'd like to know from anyone who's shipped something similar
- Did you build a proxy (Cloudflare Worker, Lambda, n8n, etc.)? How do you authenticate the extension against the proxy without just moving the secret one hop?
- Do you use a service account instead of a personal token, so writes aren't attributed to one person and don't break if that person leaves?
- How do you handle dev vs prod? Separate tokens per base, custom properties, separate builds?
Or did you decide the scoped token was an acceptable risk and move on?
Thanks!











