I have an airtable base that I have read-only access to. I created a personal access token (PAT) and gave it read-only permission to that base.
I am using an angular app to display that data on a web interface, but I'm having difficulty successfully using the API. I have added both my airtable base and PAT to my environment variables, and have been using the auto-generated documentation to try and actually list the records. I continue to get a 'FetchError' detailed here:
FetchError: request to https://api.airtable.com/v0/{BASE}/{TABLE}?maxRecords=3&view=Grid+view failed, reason: self-signed certificate in certificate chain
at ClientRequest.<anonymous> (C:\EPandA\scorecard-metrics\code\backend\node_modules\node-fetch\lib\index.js:1505:11)
at ClientRequest.emit (node:events:513:28)
at TLSSocket.socketErrorListener (node:_http_client:502:9)
at TLSSocket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'SELF_SIGNED_CERT_IN_CHAIN',
code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
When I go to the endpoint in the error I get this -
{"error":{"type":"AUTHENTICATION_REQUIRED","message":"Authentication required"}}
I've tried looking for what causes this, but have come up empty.
Here is my code: