Skip to main content
Solved

Using the OAuth access_token to list bases

  • November 16, 2022
  • 1 reply
  • 0 views

Perhaps I’m missing something, but for whatever reason I cannot get a list of bases available to me using the latest OAuth API integration.

I have “shared” a couple of bases that I want to be available via the API, but I get nothing but an empty array when querying the List Bases metadata endpoint.

curl "https://api.airtable.com/v0/meta/bases" -H "Authorization: Bearer <access_token_from_oAuth_response"
{"bases":[]}

I have confirmed that my access_token is indeed good does return my user ID and scopes allowed via the token.

curl "https://api.airtable.com/v0/meta/whoami" -H "Authorization: Bearer <access_token_from_oauth_response>"
{"id":"<my_user_id>","scopes":["data.records:read","schema.bases:read"]}

I presume that I haven’t “shared” the base in the way the API expects, but I have not found where I might do that.

Ian

Best answer by Ian_Erickson

And as I typed this, I just realized that you must include the bases you want to include in OAuth access during the authorization process, not using the administration UI as part of my account.

Never mind. All ahead full.

View original
Did this topic help you find an answer to your question?

1 reply

  • Author
  • New Participant
  • 2 replies
  • Answer
  • November 16, 2022

And as I typed this, I just realized that you must include the bases you want to include in OAuth access during the authorization process, not using the administration UI as part of my account.

Never mind. All ahead full.


Reply