APIs & Integrations

Not applicable

Getting OAuth token crashes with 403

Hello!

We are often experiencing issue of getting 403 error when requesting/renewing API access tokens. Sometimes, simple retry fixes the issue, other times – not.

We are making a post https://api.hubapi.com/oauth/v1/token request and here is the response that we see (it is HTML page!):

Response Headers: {“server”=>“AkamaiGHost”, “mime-version”=>“1.0”, “content-type”=>“text/html”, “content-length”=>“284”, “expires”=>“Tue, 15 Aug 2017 14:14:25 GMT”, “date”=>“Tue, 15 Aug 2017 14:14:25 GMT”, “connection”=>“close”}

Response Body:

<HTML><HEAD>
<TITLE>Access Denied</TITLE>

</HEAD><BODY>
<H1>Access Denied</H1>

You don’t have permission to access “http://api.hubapi.com/oauth/v1/token” on this server.


Reference #..*********.
</BODY>
</HTML>

Any suggestions how work around this?

0 Upvotes
3 Replies 3
Not applicable

Getting OAuth token crashes with 403

@Silarn, I think you are talking about a different situation: completing an OAuth flow with return/callback URL.

In our case we’ve already done the OAuth flow and we want to make calls to the API, but first we need to get a new access token using the stored refresh token. It seems to be a different issue you talk about.

0 Upvotes
Not applicable

Getting OAuth token crashes with 403

There was a thread for a similar issue recently (though it never ‘sometimes’ worked) where having a return URI with an IP address or port would simply fail like this. It seems it must be a regular domain on the standard https port, despite the fact that the initial auth step allows such URIs.

0 Upvotes
lucabartoli
Member | Diamond Partner
Member | Diamond Partner

Getting OAuth token crashes with 403

Awkward but true. Thanks Silarn for pointing this out, you save me hours of debugging.

0 Upvotes