APIs & Integrations

breixocf
Member

Bad Authorization Code issue

I want to initiate an integration using this page https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration and I completed the previous steps correctly. The problem is when I make this request
https://app.hubspot.com/oauth/4371149/authorize?client_id=**redacted**&scope=contacts+content+automation+timeline+forms+oauth&redirect_uri=https://www.example.com, the response is this

I make it correctly, because I can connect the PRO version, but I'm using this portal as a DEMO version for testing.

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Bad Authorization Code issue

Hi @breixocf,

I've gone ahead and restored that portal; going forward, you can renew the portal from the 'Testing' dashboard in your developer portal.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Bad Authorization Code issue

Hi @breixocf,

Thanks for that; it looks like this portal was downgraded to Marketing/CRM Free. This used to be the way that test portals would expire; they'd continue to exist, but they'd lose Enterprise functionality. I can restore this portal's functionality, but unless this particular portal is critically important I'd actually recommend creating a new test portal from your testing dashboard. A newly created portal won't be downgraded in the event it expires. Let me know if that works for you, or if you need me to restore this specific test portal.

0 Upvotes
breixocf
Member

Bad Authorization Code issue

If possible, we need the previous portal enabled, because the data present in it is essential for our tests. I understand that it won't change the refresh access or the other necessary keys except the access token.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Bad Authorization Code issue

Hi @breixocf,

That error occurs when the app you're installing requests scopes that your portal doesn't have access to. In this specific case, it's likely cause by the automation scope. If you're using a test portal created from your developer portal, it should have access to the automation scope. If you're using another portal for testing, I'd recommend switching to a test portal.

If the portal you're trying to install the app to is a test portal, can you give me that portal's Hub ID?

0 Upvotes
breixocf
Member

Bad Authorization Code issue

The test portal Hub ID is 4371149

0 Upvotes