Skip to main content

Hi everyone, 

Excited to be using the Airtable API!

I'm trying to add new fields to a given table in a given base via this endpoint, but keep getting a 404 {'error': 'NOT_FOUND'}

Here's my code:

payload = json.dumps(payload)
response = requests.get("https://api.airtable.com/v0/meta/bases/{base_id}/tables/{table_id}/fields".format(base_id=base_id,table_id=table_id),
headers={"Authorization":"Bearer {token}".format(token=API_TOKEN),"Content-Type": "application/json",},
data=payload)
 
Could anyone advise?

Can you tell a little more about where this code came from,  what language you are using, and how you are running it?

These issues jumped out at me. There may be other issues.

- You are using GET request instead of a POST request.

- You are using an API key, which is not supported for creating fields. You should use a personal access token (or oAuth) instead.


Thank you so much! Yes, my bad, I changed this to a post request, and it works now. I was using a personal access token, but realize the labeling was probably confusing. Will fix.

This code is in python, I'm running it within a script.

 


Reply