APIs & Integrations

danielolarte
Participant

Access Denied when trying to refresh an access token

Hello

I’m have an integration that updates the timeline and properties of the contacts, and half an hour before the access token expires, we’re refreshing the token but lately when we need to refresh the token, we receive the Access Denied error and the only way to make it work is: revoking the current access token and generate a new one.

Any idea why this could happening? Am I hitting a rate limit that is blocking my IP or something?

Thanks

0 Upvotes
9 Replies 9
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Access Denied when trying to refresh an access token

Hi @danielolarte,

The IP blocks due to our CDN aren’t permanent, and should resolve on their own. I believe that in this case the errors are actually the result of a recent CDN transition being made internally, which should be completed soon. Over the next few days, you should see these 403 error rates being reduce or eliminated completely. Can you monitor the rate of these errors over the next few days? If you’re still seeing high 403 error rates later in the week, reach back out on this thread and I can take a closer look.

0 Upvotes
danielolarte
Participant

Access Denied when trying to refresh an access token

Hi @Derek_Gervais

No, I’m not on a shared IP address, and at this point, I can’t rotate the IP. When we released a new version of our integration, we were sending a lot of data to your servers trying to update all the contacts of our clients, is there any way that we can be unblocked?

Thanks

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Access Denied when trying to refresh an access token

Hi @danielolarte,

Are you on a shared IP address? And is there a way for you to rotate your IP address? The blocks occur based on apparently malicious activity, so you might still be affected by a block if your IP is shared by someone who’s behavior appears malicious.

0 Upvotes
danielolarte
Participant

Access Denied when trying to refresh an access token

Hi @Derek_Gervais

Yes, sure, the IP is 52.2.91.214.

Thank you

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Access Denied when trying to refresh an access token

Hi @danielolarte,

Can you send me the IP address of the server that appears to be blocked?

0 Upvotes
danielolarte
Participant

Access Denied when trying to refresh an access token

Hi @Derek_Gervais

I checked, and I’m sending the request to the https. But I execute the same requests from a different server and it worked perfectly. I think it’s related to our server being blocked. How can I know that?

Thanks

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Access Denied when trying to refresh an access token

Hi @danielolarte,

The URL should be https; can you try refreshing the token with the secure URL? (https://api.hubapi.com/oauth/v1/token)

Refresh OAuth 2.0 Access Token

POST /oauth/v1/token

0 Upvotes
danielolarte
Participant

Access Denied when trying to refresh an access token

Based on the answers of other posts, I stop my requests for a couple of hours, and I execute every 10 minutes, 50 API calls, the same error happens when I try to refresh the token. Please, let me know what can I do to fix this issue.

I’m receiving this response:

You don’t have permission to access “http://api.hubapi.com/oauth/v1/token/” on this server.
Reference #18.ade13217.1512493911.3cce777e

0 Upvotes
danielolarte
Participant

Access Denied when trying to refresh an access token

Hi

Does anyone have any answer on this? It’s affecting our current customers using the Hubspot integration.

Thank you

0 Upvotes