Installing Private App on a developer test portal


#1

Hi all,
I need to export all new contacts from a portal to an external CRM. To do so, I created an app with a single webhook subscription to contact.creation.
I created the endpoint which gets the payload of the webhook and make the request ti the portal to get contact info.
The endpoint works and gets the contacts from the portal. The app endpoint test works also.
I then installed the app on the test portal to try the entire flow, but “App installs” is still on 0 and the endpoint is never called.

These are the steps I followed:

  1. Get my test portal ID: 2849XXX
  2. Get the app client-id (app page inside the developer portal, at the end of the page): XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX
  3. Make the install link:
    https://app.hubspot.com/oauth//authorize?client_id=&scope=contacts%20oauth&redirect_uri=https%3A%2F%2Fwww.hubspot.com
  4. Visit the install link and select the test Portal App
  5. Get automatically redirected to redirect_uri

Problems now:

  1. I don’t see the installed App from https://app.hubspot.com/integrations-beta/28499XX/your-integrations
  2. The app seems to be installed on the portal, because i can’t visit the install link again without being immediately redirected
  3. Obviously, endpoint is never called by adding a new contact

Any suggestion?


#2

Just a correction at point 3, as the forum cropped the link. The link i made is:
https://app.hubspot.com/oauth/authorize?client_id=< client ID >&scope=contacts%20oauth&redirect_uri=https://www.hubspot.com

It correctly redirects to https://www.hubspot.com?code=XXXXXXXXX


#3

@LucaBartoli You then need to take that code and make a post call with your client ID and secret to finish off the oauth flow.

Here are the docs for it.


#4

@pmanca is this required to have an app installed?
The only thing I miss is i don’t see the app installed on my test portal. Do the app wait until the first call to be authorized? This is not written in any docs.


#5

@LucaBartoli Yes it is required to have an app be installed. Making the post call with the code is part of a normal oauth flow. Until you have done that you have not completed an oauth flow.