Authentication credentials not found.

We have a HubSpot integration build in our App using OAuth protocol. This integration works fine most of the time. Intermittenly, we get this error when trying to do any CRUD operation using API.

Status: 401Message: Authentication credentials not found. This API supports OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview

I have verified that our system is sending valid access token with enough time until expiration. Can we get some help from HubSpot team here? I can share all the detail of events and Hub ID.

Hey @tchemi - thanks for posting in the Community!
I’d like to tag in some experts here to see if they have any insight for us! @Phil_Vallender, @Anton, and @alyssamwilie - any idea what could be causing this error?
Shane, Senior Community Moderator

Hi @tchemi

"If you are trying to perform the curd operation in your own instance, I’ll suggest you use the pvt app, provide appropriate scopes, and then use the access token provided by the app. In this way, you can perform the CRUD operation in your instance. Here is a link to pvt app -

https://developers.hubspot.com/docs/apps/legacy-apps/private-apps/overview

If you are creating a public app, then we need the OAuth approach, where you have to store the app id, refresh token and then generate the access token to hit the API to perform CURD operation. Here is a link to public app
- Legacy public apps - HubSpot docs

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!

@GRajput Our oauth app works fine and have no issues at large. But intermittently HubSpot responds with “Authentication credentials not found” even when we are sending a valid or unexpired token.
We have large user base who have no issues with the app. I am currently debugging this for targeted set of users. I need someone from HubSpot who can work with me on this.