Help

Issue with API Request - Error Message "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND"

Solved
Jump to Solution
463 5
cancel
Showing results for 
Search instead for 
Did you mean: 
geobks
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I'm reaching out for assistance with an issue I've encountered while trying to interact with the Airtable API. Despite following the documentation provided by Airtable and ensuring that I've granted the necessary permissions, I'm consistently receiving an error message.

Here's the API request I'm making:

curl -X POST "https://api.airtable.com/v0/meta/bases" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"name": "Apartment Hunting",
"tables": [
{
"description": "A to-do list of places to visit",
"fields": [
{
"description": "Name of the apartment",
"name": "Name",
"type": "singleLineText"
},
{
"name": "Address",
"type": "singleLineText"
},
{
"name": "Visited",
"options": {
"color": "greenBright",
"icon": "check"
},
"type": "checkbox"
}
],
"name": "Apartments"
}
],
"workspaceId": "wspmhESAta6clCCwF"
}'

However, I'm consistently receiving the following error message:

{
"error": {
"type": "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND",
"message": "Invalid permissions, or the requested model was not found. Check that both your user and your token have the required permissions, and that the model names and/or ids are correct."
}
}

I've double-checked my user permissions and token, and everything seems to be in order. I've also ensured that the model names and IDs are correct. Despite this, I'm still encountering the error.

If anyone has encountered a similar issue or has any insights into what might be causing this error, I would greatly appreciate your assistance.

Thank you in advance for your help!

Best regards,

1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

The code you pasted above (which is the example used in Airtable's API documentation) worked 100% perfectly for me on the very first try in Postman.

I just copied and pasted it into Postman and it worked (once I changed it to a valid Workspace ID and a valid Personal Access Token).

You didn't use the Workspace ID from the documentation, did you? That is just an example Workspace ID, not a real Workspace ID.

See Solution in Thread

5 Replies 5

Is the connected account a creator in the workspace? Also, does your personal access token have the scope "schema-bases-write" set for the workspace?

geobks
5 - Automation Enthusiast
5 - Automation Enthusiast

The connected account is set as an owner.

Yes, the personal access token has the "schema-bases-write" scope set for the workspace.

 

Capture d'écran 2024-03-16 155142.jpg

ScottWorld
18 - Pluto
18 - Pluto

The code you pasted above (which is the example used in Airtable's API documentation) worked 100% perfectly for me on the very first try in Postman.

I just copied and pasted it into Postman and it worked (once I changed it to a valid Workspace ID and a valid Personal Access Token).

You didn't use the Workspace ID from the documentation, did you? That is just an example Workspace ID, not a real Workspace ID.

geobks
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you, Scottworld, for resolving my issue! Indeed, there was an error with the Workspace ID. Your help is greatly appreciated!

You're welcome!

p.s. For anybody else reading this thread in the future who may need advanced Airtable API help, I am available for hire as an expert Airtable consultant through my website: Airtable Consulting — ScottWorld