Help

Re: Unable to create table with API - "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND"

121 1
cancel
Showing results for 
Search instead for 
Did you mean: 
StevieB
4 - Data Explorer
4 - Data Explorer

Hi All,

I'm using Voiceflow, when i try to create a new table in an existing base using the API i get the following error:

{
 "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."
 },
 "VF_STATUS_CODE": 403

 This is the url endpoint i'm using:

https://api.airtable.com/v0/{baseID}/{table_name}

I have a valid base id and i'm populating the {table_name} variable with the users 'user id' such as 'TYSCH'.

I have all my scopes selected in my access token.

Screenshot 2024-12-10 at 08.00.30.png

Voiceflow API Settings:

Screenshot 2024-12-10 at 07.57.58.png

 My JSON body:

{
  "table_name": "{table_name}",
  "fields": [
    {
      "type": "singleLineText",
      "name": "UserId"
    },
    {
      "type": "singleLineText",
      "name": "TokenUsage"
    },
    {
      "type": "createdTime",
      "name": "Session Date & Time"
    }
  ],
  "views": [
    {
      "name": "Grid view",
      "type": "grid"
    }
  ]
}

Seems to be a permission issue but i've tried everything and it's not working.

Any help would be appreciated!

Thanks,

Steve

 

2 Replies 2

Hmm the endpoint you're hitting and your JSON are incorrect.  Check out the docs: https://airtable.com/developers/web/api/create-table

The expected endpoint is: https://api.airtable.com/v0/meta/bases/{baseId}/tables

Creating 'createdTime' fields and views via the API isn't possible at this time either I think

Thanks for the reply @TheTimeSavingCo.

Yes your right about both. i put the endpoint from the docs and I removed the the created time/views but that still didn't work, what did work though was when I changed the 'table_name' to 'name' in line 2.

 

{
  "name": "{user_id}",
  "fields": [

 

Now it's working! 😊