Skip to content

Instantly share code, notes, and snippets.

@ggondim
Created May 18, 2020 23:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ggondim/e4e7fa2e1b6e7118c34cb281ade6c170 to your computer and use it in GitHub Desktop.
Save ggondim/e4e7fa2e1b6e7118c34cb281ade6c170 to your computer and use it in GitHub Desktop.
Airtable schema API request

Airtable Schema API

Replace the variables below in the script

  • YOURBASEID: your Airtable base ID starting with 'app...'
  • YOURCOOKIESFORAIRTABLEDOMAIN your browser cookie for airtable.com domain
const myHeaders = new Headers();
myHeaders.append("x-airtable-application-id", "YOURBASEID");
myHeaders.append("x-time-zone", "America/Sao_Paulo"); // change to your timezone if you want to
myHeaders.append("x-user-locale", "pt-BR"); // change to your language if you want to
myHeaders.append("X-Requested-With", "XMLHttpRequest");
myHeaders.append("Cookie", "YOURCOOKIESFORAIRTABLEDOMAIN";
const requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
const response = await fetch("https://airtable.com/v0.3/application/YOURBASEID/read", requestOptions);
const schema = await response.json();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment