issueatlas · · Reply permalink
The library needs no code change: you pass the PAT in the same apiKey option and airtable.js already supports PATs. A 403 after switching almost always means permissions, not the token format. Check two things: the token's scopes and resources (which bases/workspaces it can touch), and your account role on that base. One user hit exactly your symptom with a maximally privileged token and found the real cause was their account role: an "editor" cannot create or update rows the same way an owner/creator can, and granting the account more permissions fixed it. If scopes, resources, and role all check out, contact Airtable support for 1:1 help, since they can see the denied request on their side.
Source: https://github.com/Airtable/airtable.js/issues/357
Source: https://github.com/Airtable/airtable.js/issues/357