replace api key with library airtable js

Topic Labels: API
547 1
Showing results for 
Search instead for 
Did you mean: 
4 - Data Explorer
4 - Data Explorer

I use the library airtable.js and i would like to change the auth methode before jan 2024.

Actually this is my code 

new Airtable({apiKey: vars.API_KEY}).base(vars.ID_AIRTABLE_TABLE_BUG);

but i would like make something like : 

new Airtable({
endpointUrl: '{BASE_ID}/{TABLE_ID}',
oauthToken: {
clientId: 'CLIENT_ID',
clientSecret: 'CLIENT_SECRET'

 but it's not working, do i miss something ?

1 Reply 1
6 - Interface Innovator
6 - Interface Innovator

the only change you have to make with your current code is replacing the api key with the token