Test app Installation in test portal


#1

Hello Hubspot !

I’ve juste created an app (app_id : 36821) on my dev account (hub_id : 2595735). I’ve use the api to create new Event Type with its own properties. Everything ok.

Now I want to “install” this app into my test portal (hub_id : 2596495) to send events with this new event type. I cant figure out how to do that. I’ve looked around the forum and documentation but I cant found how to install a test app.

Any help is welcomed.

Regards,

Ruben


Permissions error trying to install our own APP
#2

Hi @Ruben_BAP

You install an app in a portal by initiating an OAuth connection between the app and the test portal. You can find the documentation for that here:

After initiating that connection, you’ll get an access_token that you’ll use to make API calls to the test portal.


#3

Hello dadams,

Thank you for your help. I tried to do the initial integration by sending my test portal user to https://app.hubspot.com/oauth/TEST_PORTAL_HUB_ID/authorize?client_id=APP_CLIENT_ID&scopes=contacts+automation+timeline&redirect_uri=http://www.hubspot.com

This seems to be the correct page because it says :

Request for Integration Permission
BAP Test wants permission to:
Create timeline events
Provides the ability to add events to contact timelines
Read from and write to my Contacts
This includes prospects, lists, forms

When I click on “Grant access” I get redirected to :

So it seems that I’m doing something wrong. I tried to change the scopes to something else and I still have this error. Any idea ?


#4

@Ruben_BAP can you message me directly with the Hub ID and client ID that you’re testing this with? It may be something specific to your app.


#5

Hey guys, was this issue resolve, because I’m seeing much the same problem:
a) Redirecting through auth at https://app.hubspot.com/oauth/authorize?client_id=817ad9e7-2103-40af-a1db-b1fd471e0887&scope=contacts&redirect_uri=http://www.hubspot.com works well. I’m asked to log in, identify my portal, and verify permissions for the requested scope.
b) After this, I’m redirected back to http://www.hubspot.com/?error=invalid_request&error_description=missing+or+invalid+scopes.

Any ideas for solutions?


#6

@steffentchr can you message me directly and send me the Hub ID you were trying to authorize with that app?


#7

The portal id I’ve been trying to authenticate for is 2555036 – but have also tried with the hubspot demo portal with the same result.


#8

Hi David, in the same boat here; hoping to play with some web form stuff in a test app. Using the URL https://app.hubspot.com/oauth/2693322/authorize?client_id=386d7b3d-5ba7-4c26-b0da-e280af3d9994&scopes=contacts%20automation%20timeline&redirect_uri=https://www.hubspot.com (the docs say to provide %20 as the scope separator) I’m coming up with https://www.hubspot.com/?error=invalid_request&error_description=missing+or+invalid+scopes and no sign of the app installed in the test portal.


#9

@steffentchr @GeoffMcQueen The most likely reason for getting that missing scopes error is that the settings for the app you’re trying to authorize has scopes checked off that you’re not including in the authorization URL. Any scopes checked in the app settings are considered required, so they’ll need to be included or you’ll get that error.


#10

Thanks David - was it. I needed to use oauth and forms. Got the successful ID from using https://app.hubspot.com/oauth/2693322/authorize?client_id=386d7b3d-5ba7-4c26-b0da-e280af3d9994&scopes=contacts%20oauth%20timeline%20forms&redirect_uri=https://www.hubspot.com but my question now is - how do I have app appear authorized inside of the Test Portal. I understand oAuth relatively well as an independent developer, but this is all a loop within Hubspot so I’m a bit confused


#11

The app won’t currently appear anywhere inside the portal. We’re in the process of building a new UI that will show all installed apps instead of just featured apps.


#12

No worries; so to confirm:

  1. The App is actually installed and functioning (ie, firing webhooks, etc) after executing the oAuth approval flow, even though there isn’t a “well done congrats” type experience, and
  2. The App isn’t visible to the Test Portal because only recommended Apps appear?

Geoff


#13

The end of the OAuth authentication process should end with your app receiving the code after redirecting to the redirect URI you specify in the initial authorization URL, so if you get that code that means the app was authorized, and you’ll start getting webhooks at that point. You can view the history of webhooks you’ve received by viewing the webhook subscriptions dashboard in your app settings.

The app will not be visible in the portal. At the moment only HubSpot internal integrations will appear as installed, with the featured integrations listed, but we’ll have a new dashboard that shows all installed apps soon.


#14

Thank you for that heads up dadams! I was going crazy trying to figure out why I couldn’t get my oAuth working, is that in the documentation along the lines of what you said? If so I am blind.


#15

It took me days to figure out that I needed to go through the second step of Oauth (converting the code to a token) in order to connect my app to an account. This is very confusing and should be documented more clearly. I suggest an article along the lines of “How to connect a private app to your hubspot account”


#16

Hi everyone!! One more info about this portal auth with application.
You should use private application to to this! I got an integration with private application. Also what i investigated is that you can pass different scopes with private app even if they don’t set in app settings.
But
this is small recap:

  1. Try use same amount of scopes in request url as selected in app settings
  2. For test and development please crete the private application instead public
  3. inside request url scopes should be separated by %20 symbol. But if you are using omniauth-hubspot gem you should use just gaps.

#17

Hi. I’m trying add a private application from my developer portal into the test portal using the oauth. this all works (apparently), the requetsbin gets the code: c7c4eb74-7e86-4e06-b341-5944d6472368 so the registration looks like its worked.

The application has basic webhook subscriptions for contacts (create, delete). But the webhooks don’t fire and aren’t logged in development portal. I don’t know how to debug.

dev portal : 4132642

markting portal : 4132745

oauth url : https://app.hubspot.com/oauth/authorize?client_id=c4848de9-93ae-4eeb-95cd-27c5e7691a3f&scope=contacts%20oauth&redirect_uri=https://requestb.in/1g92qk11

can you let me know what i am doing wrong please ?
Thanks

dan