# 'An invalid scope name was provided' Error.

**URL:** <https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563>\
**Category:** APIs & Integrations\
**Tags:** oauth\
**Created:** [May 23, 2022, 9:18pm UTC](https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563 "2022-05-23T21:18:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PZhang](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@PZhang](https://community.hubspot.com/u/PZhang)\
**Post date:** [May 23, 2022, 9:18pm UTC](https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563/1 "2022-05-23T21:18:31Z")

</div>

The link I used is:  
[https://app.hubspot.com/oauth/authorize?client\_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scope=crm.lists.read%20crm.objects.contacts.read%20crm.schemas.contacts.read%20crm.objects.companies.read%20crm.objects.deals.read%20crm.schemas.companies.read%20crm.schemas.deals.read%20crm.objects.owners.read&redirect\_uri=https://www.example.com/](https://app.hubspot.com/oauth/authorize?client_id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&scope=crm.lists.read%20crm.objects.contacts.read%20crm.schemas.contacts.read%20crm.objects.companies.read%20crm.objects.deals.read%20crm.schemas.companies.read%20crm.schemas.deals.read%20crm.objects.owners.read%20oauth&redirect_uri=https://www.example.com/)  
It only asks for read permissions for CRM tables and I have tested it in several test accounts(free account) and it worked well. However, it is giving the error shown in the title for one of the accounts I was trying to connect to(that account could be of a higher tier, but I don’t think this should be a problem). Did I miss anything about the scope name in my link? Thanks in advance for any help. I tried all sorts of things on my side but cannot even reproduce this issue.

---

<div class="post-metadata">

**Author:** ![PZhang](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@PZhang](https://community.hubspot.com/u/PZhang)\
**Post date:** [May 24, 2022, 3:20pm UTC](https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563/2 "2022-05-24T15:20:50Z")

</div>

Turns out to be caused by formatting issue. The “%20” is translated to white space and the white space is translated to new line during copy and paste of the link. The scope name gets messed up because of that.

---

<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:** [May 24, 2022, 5:58pm UTC](https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563/3 "2022-05-24T17:58:44Z")

</div>

Thanks for letting us know, @PZhang 🙌

---

<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:** [May 24, 2022, 3:56pm UTC](https://community.hubspot.com/t/an-invalid-scope-name-was-provided-error/57563/4 "2022-05-24T15:56:42Z")

</div>

Hey, @PZhang Thanks for reaching out. Let’s see if we can get the community conversation started. [@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510) do you have any experience here? Or thoughts on what @PZhang can provide to help the community better understand the issue?

Thank you! – Jaycee
