Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Authentication for Personal Access Tokens not working!!!!

Topic Labels: Formulas
401 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Jay_P
7 - App Architect
7 - App Architect
const Airtable = require('airtable');
 
const airtable = new Airtable({
apiKey: 'patMH--changed--FEQXBB4',
});

 

// Replace with your Airtable base ID
const baseId = 'appM0aa--changed--DFmhzwJv6w';

 

// Replace with the table name you want to access
const tableName = 'home_first';



airtable.base(baseId)(tableName)
.select({
filterByFormula: '{RECORD_ID() <= 5}', // Filter to get the first 5 records
maxRecords: 5, // Limit to 5 records
})
.firstPage((err, records) => {
if (err) { console.error(err); return; }
records.forEach((record) => {
console.log(record.fields); // Access record data using record.fields object
});
});
 
 I keep getting the following error: 
Jay_P_0-1717632023714.png

 

â—‹ node one.js
AirtableError {
error: 'AUTHENTICATION_REQUIRED',
message: 'You should provide valid api key to perform this operation',
statusCode: 401
}

Yes, I have given full permission in the scope to access the base and the read and write permissions. 

0 Replies 0