# get Code error

**URL:** <https://community.hubspot.com/t/get-code-error/82350>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [May 31, 2023, 1:21pm UTC](https://community.hubspot.com/t/get-code-error/82350 "2023-05-31T13:21:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jessefeng](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jessefeng](https://community.hubspot.com/u/jessefeng)\
**Post date:** [May 31, 2023, 1:21pm UTC](https://community.hubspot.com/t/get-code-error/82350/1 "2023-05-31T13:21:35Z")

</div>

When I am in the pre-step to obtain the authentication token: to obtain the code parameter,

i got code from the full url

 ![app_info.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/a/9aa16ba6449a7d9e152313a8c68b725127aab9c0.jpeg)

i copy the full url , choose jesse 02 account,and access in browser, my first time access is sucessful and return the code in the jump url

 ![选择账户.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/0/7008b3b77ddc068df4ac71f7c4e58ad5af376185.png)

but after that time this url always report an error

 ![3.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/b/6/b60244cdc2f7f7f40b29848d268999f5fe57082f.png)

、now i don’t know how to resolve this problem

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 1, 2023, 5:26am UTC](https://community.hubspot.com/t/get-code-error/82350/2 "2023-06-01T05:26:23Z")

</div>

Hey, @jessefeng 👋 I have two quick questions to help the community with troubleshooting.

- What are the scopes your app is using?
- Are any of the scopes set to [**optional**](https://developers.hubspot.com/docs/api/working-with-oauth#:~:text=DESCRIPTION-,Optional%20scopes,-%26optional_scope%3Dx%2520x)?
- One other long shot step, try [collecting a HAR file](https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/Troubleshooting-Toolkit-Collecting-a-HAR-file-and-Trace/td-p/20103) when you go through the flow and get the error. Occasionally, when you inspect it, you’ll spot a more helpful error message.

Thanks for the additional details! — Jaycee

---

<div class="post-metadata">

**Author:** ![jessefeng](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jessefeng](https://community.hubspot.com/u/jessefeng)\
**Post date:** [June 1, 2023, 5:36am UTC](https://community.hubspot.com/t/get-code-error/82350/3 "2023-06-01T05:36:31Z")

</div>

I still haven’t found a good solution to this error, but I found a super administrator’s account to use a private APP to generate a token
