Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api key deprecation? #357

Open
dbvisel opened this issue Mar 15, 2023 · 15 comments
Open

api key deprecation? #357

dbvisel opened this issue Mar 15, 2023 · 15 comments

Comments

@dbvisel
Copy link

dbvisel commented Mar 15, 2023

Airtable is sending out ominous messages about API keys being deprecated in favor of personal access tokens. Is this library going to be updated to use them? The most recent email claims that API keys won't work at all after February 1, 2024 – so there is some time, but I would like to get ahead of this change!

@marks
Copy link
Contributor

marks commented Mar 15, 2023

Hey @dbvisel you can pass a personal access token to this library today. The parameter is called apiKey but the README notes:

Configuration

There are three configurable options available:

Hope this clarifies things for you!

@dbvisel
Copy link
Author

dbvisel commented Mar 15, 2023

Oh thanks! I missed that. I'll try out the new method.

@marks
Copy link
Contributor

marks commented Mar 15, 2023

@dbvisel no problem -- but just to be clear, there is no new code method. You can just place a personal access token (looks like patXXX) where you used to put your user API key (looks like keyXXX)

@dbvisel
Copy link
Author

dbvisel commented Mar 15, 2023

I was pleasantly surprised to find it was so easy! Thanks.

@Anmol-Baranwal
Copy link

@marks
Is using personal access token affects useSWR?

I am getting a error in: export const fetcher = (url) => fetch(url).then((res) => res.json());

After converting to personal access token, I have not yet deleted the api key.
I have tried but the code breaks after using PAT from api key

Do you know the reason behind this?

@marks
Copy link
Contributor

marks commented Mar 20, 2023

@marks Is using personal access token affects useSWR?

I am getting a error in: export const fetcher = (url) => fetch(url).then((res) => res.json());

After converting to personal access token, I have not yet deleted the api key. I have tried but the code breaks after using PAT from api key

Do you know the reason behind this?

Hi @Anmol-Baranwal - no, but I recommend you try catch'ing the error. It should be helpful in debugging the situation. Perhaps you need additional scopes or resources (bases/workspaces) attached to your new PAT.

The support team at support@airtable.com may be able to help you debug further.

@Anmol-Baranwal
Copy link

@marks Is using personal access token affects useSWR?
I am getting a error in: export const fetcher = (url) => fetch(url).then((res) => res.json());
After converting to personal access token, I have not yet deleted the api key. I have tried but the code breaks after using PAT from api key
Do you know the reason behind this?

Hi @Anmol-Baranwal - no, but I recommend you try catch'ing the error. It should be helpful in debugging the situation. Perhaps you need additional scopes or resources (bases/workspaces) attached to your new PAT.

The support team at support@airtable.com may be able to help you debug further.

I already did both of them. I will try contacting the support team, thanks for the suggestion

@Dev1love
Copy link

@Anmol-Baranwal @marks any updates? we have a similar issue. After changing from API key to PAT we keep receiving 403 error. seems like because we have updated to payed subscription last week our API key doesn't work any more. Thanks

@Anmol-Baranwal
Copy link

Anmol-Baranwal commented Mar 24, 2023

@Anmol-Baranwal @marks any updates? we have a similar issue. After changing from API key to PAT we keep receiving 403 error. seems like because we have updated to payed subscription last week our API key doesn't work any more. Thanks

I have yet to contact the team. I will do it soon. (Please do tell me if you get a solution)

@Dev1love
The team stated that something else is causing the error and suggested using Postman to debug it.

@ruztyA
Copy link

ruztyA commented Aug 4, 2023

hi, I'm using npm airtable, after I changed the apiKey to personal access token, it kept returning a 403 error. do I miss something in integrating the library with my code? thanks

@its-a-lisa
Copy link

I'm having the same issue and I deleted my API key so I don't even have that to fall back to.

@marks
Copy link
Contributor

marks commented Aug 21, 2023

@ruztyA @its-a-lisa it's very likely the PATs you have created do not have the proper permissions -- either in terms of scopes (can the token read/write to bases) or resources (specific bases/workspaces/all your bases).

I recommend checking your PAT's scopes and resources first. Nothing in terms of authentication/authorization has changed in the Airtable.js library as best as I can tell.

@jlong5795
Copy link

I am also having this issue. My PAT has all scopes and access to all bases in all current and future workspaces. It cannot be more privileged.

@marks
Copy link
Contributor

marks commented Aug 21, 2023

@jlong5795 In that case I suggest writing into support@airtable.com for 1:1 help

@ruztyA
Copy link

ruztyA commented Aug 22, 2023

My problem is solved! It's because my account does not have the proper permission. I already checked all the scopes but turns out I still do not have permission to write a new row and update a row (my role is as "editor").
So after granting more permissions to my account, it ran smoothly. Thanks, @marks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants