# CozyRoc REST Source Failure

**URL:** <https://community.hubspot.com/t/cozyroc-rest-source-failure/13309>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, oauth\
**Created:** [March 3, 2019, 11:23am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309 "2019-03-03T11:23:38Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 3, 2019, 11:23am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/1 "2019-03-03T11:23:38Z")

</div>

Hello Gurus,

I am having issues connecting to the hubspot api using the cozyroc + ssis application.

I created an app in my hubspot (developer) account and have checked the scope (Basic OAuth Functionality) and contacts as the read and write. This matches with what is in the SSIS package as well but I get the error:

Request for Integration Permissions

Couldn’t complete the connection

Insufficient scopes were provided. Please contact the integrator.

What am I doing wrong or not doing at all please?

Kind Regards,

Tunde

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 4, 2019, 8:41am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/2 "2019-03-04T08:41:51Z")

</div>

Hi @Tunde . did you manage to go through our documentation on Scopes here [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration#scopes) ?

Are you testing the authorization on a developer portal? A developer portal does not have access to any scopes so you should be testing on a test portal.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 4, 2019, 9:32am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/3 "2019-03-04T09:32:14Z")

</div>

Hello JasminLin,

Yes, I have read the scopes. What do you mean by the developer account doesn’t have access to scopes? Would the test portal be able to pull contacts (data) from another portal (that I have access to?)

Cheers

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 5, 2019, 6:12am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/4 "2019-03-05T06:12:25Z")

</div>

Yes if you have another portal that is not a developer portal, that would work too.

I looked further into what would cause the error message you are seeing, and found that the error (Insufficient Scopes were provided. Please contact the integrator.) occurs when the scopes requested in the authorization URL don’t match up with the scopes checked off in the app’s settings.

Check in your app’s settings and uncheck/check scopes to match what you’re requesting in the authorization URL. Make sure your authorization URL matches the scopes that you have checked off in your app settings.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 5, 2019, 8:02am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/5 "2019-03-05T08:02:54Z")

</div>

Hello JasminLin,

The scopes match in both. See attached. Can you please let me know the scopes I have access to based on our account/portalID? Seems I might not be able to pull data across all scopes.

It would be nice if you can let me know the scopes I should select for it to run. I have tried only the conatcts and the basic oauth but it still didn’t work.

Please help check it.

Thanks

 ![cozyrocscopes.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/c/4cbb7da0ab60b514f15e4de9b32c7b346d85a7ce.png)

 ![hubspotscopes.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/4/343311e77ed5e69ea4189129875629718cdc09df.png)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 5, 2019, 8:15am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/6 "2019-03-05T08:15:02Z")

</div>

Hi @Tunde , is the portal you are trying to install the app on 5550685 as shown in your screenshot? If so, this portal is a developer portal and so it does not have access to any scopes and cannot be authorized with an app (also stated in the [doc here](https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration)). You can only use authorization on test portals or non-developer portals.

If it is a non-developer portal that you are trying to install the app on and you’re seeing the same error, please provide me the portal ID, and the [full authorization URL](https://developers.hubspot.com/docs/methods/oauth2/initiate-oauth-integration) you are using (exclude your client\_id value in the params).

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 5, 2019, 9:15am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/7 "2019-03-05T09:15:11Z")

</div>

Thanks for this JasminLin. I tried with other portals - 383440 (the main portal) and 5551105 (the test environment) but still got the same error.

I am attaching the screens as it comes up in cozyroc - the thirdparty I’m trying to use in SSIS. There is no where it asks for an authorization URL.

Your documentation isn’t straighforward. I have gone through loads and I’m no wiser.

 ![First Screen.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/2X/5/538a9d00ad2c4623dad8e71923928084aa23f577.png)

 ![Last Screen.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/6/76c549c50038c58b6117560c61a4bcde672b1795.png)

 ![second screen.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/f/9ff7c0ec14c0e1e84cb6f59d9bff4d0ee3548e2a.png)

 ![third screen.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/0/c0bb4ec2678bddd6dc5e59bab7278eb8f0b0fa48.png)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 6, 2019, 6:44am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/8 "2019-03-06T06:44:47Z")

</div>

Hey @Tunde , from the screenshots in the external app Cozyroc I’m not able to tell for sure since we do not know how their app is using the field inputs to do the authorization or construct the authorization URL.

With one specific example of a connection you’re trying to make, if you could send me the portal ID and the authorization URL COZYROC is using e.g.

`https://app.hubspot.com/oauth/authorize/?client_id=client_id&redirect_uri=https%3A%2F%2F%2Foauth_redirect.html%3Fstate%3D23575&scope=contacts%20forms%20content)`

I can look into it further. For example in [Cozyroc’s documentation here](http://cozyroc.com/ssis/hubspot-connection) in Wizard Step Two screenshot, you can see the authorization URL in the address bar.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 6, 2019, 7:51am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/9 "2019-03-06T07:51:08Z")

</div>

Hi @JasminLin ,

Find attached both screens from the login to the after login. I have also contacted cozyroc and was told that I should contact hubspot.

Cheers,

Tunde

 ![afterlogin.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/b/7b58e36e1b9e23f6118dfc5713ae6444dee676ce.png)

 ![authlink.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/1/71ea16d9c357917330ae1c3db89220186e098305.png)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 6, 2019, 8:25am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/10 "2019-03-06T08:25:54Z")

</div>

Hi @Tunde , sorry I should have been clearer previously, I would actually need the whole URL. The image does not display it in full.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 6, 2019, 8:40am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/11 "2019-03-06T08:40:39Z")

</div>

[https://app.hubspot.com/feedback-web-ui?portalId=53&pageUrl=https%3A%2F%2Fapp.hubspot.com%2Flogin%2F%3FloginRedirectUrl%3Dhttps%253A%252F%252Fapp.hubspot.com%252Foauth%252F5551105%252Fauthorize%253Fclient\_id%253D4b6a500b-826e-11e5-963c-e78f9b100c80%2526redirect\_uri%253Dhttps%25253A%25252F%25252Fwww.cozyroc.com%25252Foauth\_callback%25252F%2526scope%253Dcontacts%26loginPortalId%3D5551105&utk=f2dc99b32b066157099ecb57a67d549e](https://app.hubspot.com/feedback-web-ui?portalId=53&pageUrl=https%3A%2F%2Fapp.hubspot.com%2Flogin%2F%3FloginRedirectUrl%3Dhttps%253A%252F%252Fapp.hubspot.com%252Foauth%252F5551105%252Fauthorize%253Fclient_id%253D4b6a500b-826e-11e5-963c-e78f9b100c80%2526redirect_uri%253Dhttps%25253A%25252F%25252Fwww.cozyroc.com%25252Foauth_callback%25252F%2526scope%253Dcontacts%26loginPortalId%3D5551105&utk=f2dc99b32b066157099ecb57a67d549e)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 7, 2019, 2:22am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/12 "2019-03-07T02:22:58Z")

</div>

Thank you. I have 2 things to point out:

1. From the URL, the client ID doesn’t seem to match the client ID in your dev portal’s app (5550685). Are you using an app from another dev portal?
2. Going back to one of my initial guesses, if you had scopes checked in the app that you didn’t include in the authorization URL, you may see that insufficient scope error. For example if you had checked Contacts and Oauth, you need to include these 2 scopes at the minimum in the authorization URL.

I know your dev portal 5550685 has those 2 scopes checked, but you may want to verify if you are using that portal’s app because the client ID does not seem to match from what I’m seeing.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 7, 2019, 4:24am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/13 "2019-03-07T04:24:25Z")

</div>

@JasminLin thanks for the response. My dev app is what you quoted above but you said I should use the test app to connect even though the apps are created in the dev app. The test app is 5551105.

And the scopes chosen in cozyroc is as shown the screenshots sent earlier. Basic authorisation and contacts

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 7, 2019, 8:20am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/14 "2019-03-07T08:20:42Z")

</div>

To clarify, the developer portal is where you create your app, and that is 5550685 for you. A developer portal does not have any scopes so you cannot test authorization on it. 5551105 is a test portal that is just like a normal portal, so it has scopes and you can test authorization on it.

If it is certain that the dev portal you are using is 5550685, then the only thing that jumps out to me is the scopes provided in the authorization URL. **Any scopes that you have selected in the app settings are considered required scopes, so you’d need to include everything you have selected in the**  **`scope=` parameter.**

So in your app in 5550685, you have checked contacts and oauth, means you need to include contacts and oauth in your authorization URL. But according to the authorization URL that you provided, it only has a scope=contacts. I would expect this to throw out the insufficient scopes error.

Can you uncheck all scopes in your app settings and try again?

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 7, 2019, 8:35am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/15 "2019-03-07T08:35:42Z")

</div>

@JasminLin

I unchecked every scope and removed all scopes in the CozyRoc end and got an invalid scope name provided. I left all the scopes in cozyroc whilst all the scopes were unchecked in hubspot and I got the earlier error of insufficient scopes.

Find attached the invalid scope error.

 ![Invalid scope.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/5/050e7a01e7d30bd2c001a89031d63f67b18608bf.png)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 7, 2019, 9:00am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/16 "2019-03-07T09:00:21Z")

</div>

Hi @Tunde , you should not be removing all scopes in Cozyroc. You need at least one scope in the authorization URL.

So try this:

- In your app settings have all scopes unchecked
- And in Cozyroc add a scope for contacts

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 7, 2019, 9:50am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/17 "2019-03-07T09:50:03Z")

</div>

@JasminLin

I did that the last time as well and got the same insufficient scop error message. Find attached the screenshot of the message.

Thanks

 ![Insufficient.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/7/97d4a93cfbc68ac9f29bf8ab0f33a3b6b865775a.png)

---

<div class="post-metadata">

**Author:** ![JasminLin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jasminlin/32/99730_2.png) [@JasminLin](https://community.hubspot.com/u/JasminLin)\
**Post date:** [March 7, 2019, 10:20am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/18 "2019-03-07T10:20:01Z")

</div>

@Tunde Ok, I really think the issue is we are not looking at the correct app you are trying to authorize - which is the client\_id that is being used in the authorization URL. As I mentioned previously, according to the Cozyroc authorization URL you provided, the client\_id in the URL is 4b6axxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. But the client\_id of your app in developer portal 5550685 is edf2xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

If I try to authorize using this URL [https://app.hubspot.com/oauth/authorize?client\_id=edf2xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect\_uri=https://www.cozyroc.com/oauth\_callback/&scope=contacts](https://app.hubspot.com/oauth/authorize?client_id=edf2xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&redirect_uri=https://www.cozyroc.com/oauth_callback/&scope=contacts) it works for me. If I change the client\_id to 4b6axxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx I’ll get the insufficient scopes error.

The client\_id is unique to each app in a developer portal. If you can find out from your team which developer portal’s app you are using, you can have them uncheck the scopes in that portal’s app settings. Or change your Cozyroc connection to use the client\_id from your app in 5550685. I would not know specifically where in Cozyroc you can change the client\_id, but that would be the direction to go now.

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 7, 2019, 10:37am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/19 "2019-03-07T10:37:42Z")

</div>

Thanks @JasminLin

I have contacted CozyRoc’s Support with your suggestions. I’d let you know once I get some feedback.

Cheers

---

<div class="post-metadata">

**Author:** ![Tunde](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tunde/32/79644_2.png) [@Tunde](https://community.hubspot.com/u/Tunde)\
**Post date:** [March 10, 2019, 8:33am UTC](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309/20 "2019-03-10T08:33:45Z")

</div>

Hi @JasminLin

Got a feedback from CozyRoc to include all scopes in their add-on and tick all scopes in hubspot which I did. The outcome:

This worked for the test site: 5551105 and I could access the two contacts that I reckon comes by default with a test portal in HubSpot. It however, didn’t work for the main portal with portalID - 383440 and came with a “Request for Integration Permissions” error. Is this an access error and if so, can you please let me know what access I need to be granted to get the data?

Also, if it has to do with the limited apps/tools we are currently subscribed to with Hubspot, please do let me know which scopes to include.

Please find attached the error message I got.

Many thanks for your continued support.

Cheers,

Tunde

 ![hubspotaccess.PNG](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/e/eecbb1b3768cf0b2f12f8b0cbd685e146fb7f8ce.png)

[Next page](https://community.hubspot.com/t/cozyroc-rest-source-failure/13309.md?page=2)
