- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 28, 2024 08:54 AM
I can't get Block SDK to work with Personal Access Tokens. It doesn't accept the format and returns...
Error: ❌ Invalid Airtable API key specified. Make sure you copied it correctly from airtable.com/account.
Code: airtableApiKeyMalformed
@Olafur_Petursso: I saw your post from a few weeks ago and adding the secret key seemed to work for you. You do mean this key, correct?
Any help is highly appreciated!
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 06:35 AM
Puh, realized I was still using an old version of the Blocks CLI. Played around with Node.JS versions and eventually managed to update. Now all is working! Thanks for your support and sharing!!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 28, 2024 05:05 PM - edited Jul 28, 2024 05:05 PM
Is this during `block init`? If so, I vaguely recall hitting something similar; ended up solving it by just making a PAT with access to everything with all workspaces forever heh
And yeap I used that key; lemme know if you're still facing issues with a key that has access to everything and I'll run some tests
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 28, 2024 10:08 PM
@TheTimeSavingCo Thank you! This is happening for 'block set-api-key' and also on 'block submit'. I've tried using a PAT with access to everything, but that didn't solve it. I feel that there is a validator inside of the Blocks SDK that isn't allowing the PAT format and still relies on the old API key format. Setting legacy API keys still works via 'set-api-key', but fails when submitting.
I've reached out to AT support.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 12:09 AM
Weird! I just created a new PAT with only block scopes and access to current and future workspaces. I then did a `block set-api-key` and it saved it fine
Let me know if I can test anything to help!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 12:36 AM - edited Jul 29, 2024 12:37 AM
Tried the same again (hadn't used "access to current and future workspaces" before), but with no luck. What's your blocks version in package.json?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 06:04 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 06:35 AM
Puh, realized I was still using an old version of the Blocks CLI. Played around with Node.JS versions and eventually managed to update. Now all is working! Thanks for your support and sharing!!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 29, 2024 08:54 PM
Ahh yeah, been there man. Glad you got it sorted!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 24, 2024 11:39 PM
If you've already tried a PAT with only block scopes and access to current and future workspaces and it still isn't working you may want to open a support ticket with Airtable directly!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 25, 2024 07:36 AM
Have you checked your Block CLI version? Not updating that caused the issue for me (had to play with Node versions a bit as far as I remember)