# Problem getting Authentication Token

**URL:** <https://community.hubspot.com/t/problem-getting-authentication-token/11873>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [March 14, 2018, 10:48am UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873 "2018-03-14T10:48:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 10:48am UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/1 "2018-03-14T10:48:47Z")

</div>

I’m using this link to get the authentication token `https://app.hubspot.com/oauth/authorize?client_id=<clientId>&scope=contacts%20content%20reports%20social%20automation%20timeline%20forms%20files%20transactional-email&redirect_uri=https://www.example.com/`  
and I get this error

[

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

image.png710x430 14.1 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/c/ca69066c73e7ab2370f54583a65908d6a357f5a6.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/c/ca69066c73e7ab2370f54583a65908d6a357f5a6.png))

I have all scopes accepted:

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/7/f770c1cbe66dd4751fb18546e066c7a8ee6ce3a3.png)

image.png1011x407 25.1 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/7/779d949ad964843a4de75d3f194f387f6839c425.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/7/779d949ad964843a4de75d3f194f387f6839c425.png))

So why I’m getting the error?

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 12:34pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/2 "2018-03-14T12:34:30Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) Can you DM me your Client ID and secret. I’d like to see if I can reproduce this on my end.

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 12:46pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/3 "2018-03-14T12:46:36Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) You were missing the hubdb scope but that didn’t seem to be the entire fix. I can reproduce it on my end.

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 12:48pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/4 "2018-03-14T12:48:19Z")

</div>

Can you confirm that the portal you are trying to install into has transactional email and the website add-on? also what edition of HubSpot is it?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 12:49pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/5 "2018-03-14T12:49:01Z")

</div>

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/f/cf2bc120a2df560b2faa30902428a00bdbedcf1c.png)

image.png1046x397 25.1 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/4/47564fcf4395e28aa545456ecceb22a858d02a3f.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/4/47564fcf4395e28aa545456ecceb22a858d02a3f.png))

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 12:49pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/6 "2018-03-14T12:49:25Z")

</div>

I have everything active.

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 12:51pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/7 "2018-03-14T12:51:19Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) Checking off the boxes doesn’t mean that the portal you are installing the app into has access to automation or hubdb or transactional email.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 12:53pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/8 "2018-03-14T12:53:01Z")

</div>

[

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/4/54b5457a5d8b5cdbbef1531659314e9a27512f0c.png)

image.png1322x305 20.2 KB

]([https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/a/a5c1670d6e8634790d0636671031fb671104346c.png](https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/a/a5c1670d6e8634790d0636671031fb671104346c.png))

I have this accounts, the last is where I will use for test HubSpot integration.

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 12:55pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/9 "2018-03-14T12:55:44Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) You can only install apps into a marketing/sales portal. You cannot install an app into a developer portal.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 12:57pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/10 "2018-03-14T12:57:03Z")

</div>

I use the Developer domain called Enxendra DEV with the Docuten DEMO connection. Sincerely, I don’t know how I could work correctly, and I feel strange about this  
 ![frowning.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/b/fb6c1916cdc6571c2447ebed4677a2bbdabf2927.png)

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 14, 2018, 1:02pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/11 "2018-03-14T13:02:25Z")

</div>

No need to feel strange! You need to make a normal portal either in Testing or with a free CRM to test with.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 14, 2018, 1:06pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/12 "2018-03-14T13:06:05Z")

</div>

I thought that I did it. How I must do this?

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [March 15, 2018, 2:33pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/13 "2018-03-15T14:33:22Z")

</div>

Hi [@breixocf](https://community.hubspot.com/u/breixocf),

Here’s some documentation on creating test portals and getting their API key:

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/e/9ec72b36e84453d5e1c1c01fe2c7d73964fc55f8.png) [developers.hubspot.com](https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-portal)

### [How do I create a test portal?](https://developers.hubspot.com/docs/faq/how-do-i-create-a-test-portal)

Test portals can be used to test your integration without affecting your live HubSpot data.

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/3/23ea0ff39f94745d32876853337d2fc1c4039be4.png) [knowledge.hubspot.com](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)

 ![e5da6784d43d9950cd5ace670e65e010709a3156.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/5/e5da6784d43d9950cd5ace670e65e010709a3156.png)

### [How do I get my HubSpot API key?](https://knowledge.hubspot.com/articles/kcs_article/integrations/how-do-i-get-my-hubspot-api-key)

Marketing Basic, Professional, and Enterprise customers and portals with a CRM can access the HubSpot API. Learn how to access your HubSpot API key here.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 19, 2018, 8:36am UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/14 "2018-03-19T08:36:49Z")

</div>

I created a test portal, but when I accessed to that page, it gave me the error  
 ![frowning.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/b/fb6c1916cdc6571c2447ebed4677a2bbdabf2927.png)  
I followed the steps until here  
[Legacy public apps - HubSpot docs](https://developers.hubspot.com/docs/faq/installing-an-app) and the Request for integration permissions showed me the error (obviously a different page). I want to do a OAuth integration. Ask me if I must give you more info please.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 19, 2018, 8:40am UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/15 "2018-03-19T08:40:19Z")

</div>

[https://app.hubspot.com/oauth/2300022/authorize?client\_id=229cdc01-02c2-4604-bccb-7009053c288a&scope=contacts%20content%20reports%20social%20automation%20timeline%20forms%20files%20hubdb%20transactional-email&redirect\_uri=https://www.example.com/](https://app.hubspot.com/oauth/2300022/authorize?client_id=229cdc01-02c2-4604-bccb-7009053c288a&scope=contacts%20content%20reports%20social%20automation%20timeline%20forms%20files%20hubdb%20transactional-email&redirect_uri=https://www.example.com/)

This is the URL that I used. And the page gave me this response

Request for Integration Permissions  
Uh oh!  
Insufficient scopes were provided. Please contact the integrator.

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 19, 2018, 2:54pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/16 "2018-03-19T14:54:01Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) Can you uncheck agregar forumlarios de accion and seeing if that helps?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 19, 2018, 3:42pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/17 "2018-03-19T15:42:00Z")

</div>

I created a new application and it worked! In this new app I don’t pick that option… Maybe that fixed the problem, thank you!

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 19, 2018, 8:53pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/18 "2018-03-19T20:53:10Z")

</div>

I’m glad you have it working! Form actions aren’t really a thing anymore so checking it off without needing it might have caused the issue.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [March 20, 2018, 8:27am UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/19 "2018-03-20T08:27:01Z")

</div>

Hello [@pmanca](https://community.hubspot.com/u/pmanca) [@Derek\_Gervais](https://community.hubspot.com/u/derek_gervais)!  
I have a new answer for you guys. In our company we are using HubSpot for a webpage with JS integration for forms. But now we want to synchronize the data obtained and add some events in Timeline for every contact.

Can I get access token for that app? Can we still have the 2 integrations (JS integration in forms and HTTP requests in code) ?  
If you need more info, please contact me

Hope you have a good day  
 ![blush.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/a/6ac9f9228a7eb54a5625567e73a7a7e02686488f.png)

---

<div class="post-metadata">

**Author:** ![3PETE](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/3pete/32/61905_2.png) [@3PETE](https://community.hubspot.com/u/3PETE)\
**Post date:** [March 21, 2018, 1:07pm UTC](https://community.hubspot.com/t/problem-getting-authentication-token/11873/20 "2018-03-21T13:07:09Z")

</div>

[@breixocf](https://community.hubspot.com/u/breixocf) You can use the access token for that app since you have “Formularios” checked off. You do not need a second app.

[Next page](https://community.hubspot.com/t/problem-getting-authentication-token/11873.md?page=2)
