Permission error when trying to manipulate HubDB via API

oauth

#1

I am creating an app which requires integration with HubDB. The doc at http://designers.hubspot.com/docs/tools/hubdb mentions that we can use POST and PUT requests with HubDB API so I assume it is possible to use API to create/update tables in HubDB. But when I try to do so, I got the following error:

This oauth-token (snipped) does not have proper permissions! (requires all of [hubdb-access])

This scope is not listed in the OAuth documentation. I tried to authorize this scope with following URL:

https://app.hubspot.com/oauth/2661774/authorize?client_id=[id]&redirect_uri=https%3A%2F%2Fhttpbin.org%2Fget&scope=content%20hubdb-access

But I got the following error and couldn’t finish authorization:

Uh oh!
An invalid scope name was provided. Please contact the integrator.

Is there anything I missed? What should I do to access the HubDB API? Thanks.


#2

I just found that I can create table via HubDB APIs using hapikey parameter, so it appears that HubDB write access is only available to API key at this moment, but not OAuth authorization. Can anyone confirm this?


#3

@SAPikachu I will reach out internally and see if I can confirm it.


#4

@SAPikachu I have confirmed this is the case at the moment. An internal case has been made to fix the scope on the Oauth2 authorization.


#5

@pmanca Thanks for confirming this! Waiting for the fix eagerly. :slight_smile:


#6

@SAPikachu Where as I don’t have a timeline on the fix I have signed up for email notifications on this so i can track the results. Will post back when there are changes.


#7

@SAPikachu We have created a new hubdb scope to use for your OAUTH connection to the hubdb tables. Simply change your call from …scope=content… -> …scope=hubdb… Thanks for your patience!


#8

@pmanca Will try it later. Thanks very much!