API Issue with Oauth


#1

https://app.hubspot.com/oauth/4770517/authorize?client_id=096b4a01-6e30-46cf-b97a-5882d0b40496&scope=contacts%20automation&redirect_uri=https%3A%2F%2Fminersunited.co%2Fcallback.php

i requested this one .. contacts and automation scopes

but my response goes blank

I checked with postman also


#2

This is my checked scope


#3

Hi @gowtham,

Can you give me more info on what you mean by '...my request goes blank' ? Are you getting a specific error message when trying to authorize the integration? Could you also give me the Hub ID of the portal you're trying to authorize?


#4

Yes Sure .. It will goes blank page

I got this error

curl Errors: Status code: 403 Response: {"status":"error","message":"This hapikey (2d87a9d0-8e2b-4c5f-ad7d-f18d8d3ac065) does not have proper permissions! (requires all of [contacts-write])","correlationId":"3b9fa870-6788-46a3-86dc-700eb4e32a0d","requestId":"5a87abe4f9d57200d2afa712f1035daa"}

Best Regards


#5

Hi @gowtham,

Ok, I can definitely help with that error, but I'm not exactly sure how it relates to the issue we've been working on.

That error almost always means that the API key you're using is from the wrong portal; in this case, it seems you're trying to use your developer hapikey to make a request to the Contacts API. This doesn't work because your developer hapikey is tied to your Developer portal, and developer portals don't have access to any of the normal Marketing/CRM tools. You'll need to get the API key from the Marketing/CRM portal you're trying to make requests to (see below).

Regarding the previous issue; the checkboxes in your screenshot and the authorization URL you posted are related to the OAuth process, and are completely unrelated to API keys. Can you give me some more information on what happens after you navigate to that authorization URL? The following should happen:

  1. You select the portal you're looking to authorize
  2. You're asked to approve the scopes the integration is requesting
  3. You're sent to the redirect_url with a code parameter appended to the end of the URL
  4. Your app pulls the code parameter from the URL and uses it (and the endpoint listed below) to request an access and refresh token for that portal

At which stage in this process are you reaching a blank page?