Skip to content

Instantly share code, notes, and snippets.

@benoror
Forked from ggondim/README.md
Created September 23, 2020 15:53
Show Gist options
  • Save benoror/f8171138b8a63e3bc114575f39e402e7 to your computer and use it in GitHub Desktop.
Save benoror/f8171138b8a63e3bc114575f39e402e7 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