Table of Contents
Config
Flairtable.js uses a config object to set up (amongst others) authorization. You have the following options to get going:
{apiKey: string,endpointUrl?: string,apiVersion?: string,noRetryIfRateLimited?: boolean,requestTimeout?: number}
This could result in the following code:
(don't worry about YOUR_BASE_ID
, we'll get to that later)
import { Flairtable } from 'flairtable'const flairtable = Flairtable({apiKey: YOUR_API_KEY, requestsTimeout: 7000});const base = flairtable.base(YOUR_BASE_ID);
With Axios
If you don't want to use flairtable.js, I suggest using Axios, and setting it up like so:
const instance = axios.create({baseURL:'https://flairtable.com/api/v1',headers: {authorization: 'Bearer ' + YOUR_API_KEY},})return instance;
Curl
or regular curl:
curl "https://flairtable.com/api/v1/:baseId/:tableId" \-H "Authorization: Bearer YOUR_API_KEY"