Hi there,
I am trying to fetch feedback submissions with private app’s access token inside custom CRM Card, but failed with response:
{"status":"error","message":"Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview","correlationId":"459ab63f-1fca-4b07-b56e-fdb2a417095e","category":"INVALID_AUTHENTICATION"}
Request ID: 93391b24-94c4-47d2-a615-a3aa99784092
This is the code:
const hubspot = require('@hubspot/api-client');
exports.main = async (context, sendResponse) => {
const hubspotClient = new hubspot.Client({ accessToken: context.secrets.PRIVATE_APP_ACCESS_TOKEN,});
const result = await hubspotClient.crm.objects.feedbackSubmissions.basicApi.getPage();
...
}