# Associations Endpoints giving 403 Forbidden errors

**URL:** <https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998>\
**Category:** APIs & Integrations\
**Created:** [January 16, 2023, 9:10pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998 "2023-01-16T21:10:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrHunt](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@BrHunt](https://community.hubspot.com/u/BrHunt)\
**Post date:** [January 16, 2023, 9:10pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/1 "2023-01-16T21:10:54Z")

</div>

Hello,

I am trying to work with the association endpoints but running into 403 errors.

In V3 trying: GET [https://api.hubapi.com/crm/v3/associations/companies/contacts/types](https://api.hubapi.com/crm/v3/associations/companies/contacts/types)

In V4 trying: GET [https://api.hubapi.com/crm/v4/associations///labels](https://api.hubapi.com/crm/v4/associations///labels)

Both return 403 Forbidden responses.

Here are the list of scopes defined in my OAuth App:

crm.schemas.companies.write

crm.schemas.contacts.write

crm.schemas.deals.read

crm.schemas.deals.write

crm.import

oauth

crm.objects.owners.read

integration-sync

crm.objects.contacts.write

crm.schemas.custom.read

crm.objects.custom.read

crm.objects.custom.write

crm.objects.companies.write

crm.lists.write

crm.objects.companies.read

crm.lists.read

settings.users.read

crm.objects.deals.read

crm.schemas.contacts.read

crm.objects.deals.write

crm.objects.contacts.read

crm.schemas.companies.read

Am I missing some scopes that will give me access?

Thanks.

Bryan Hunt

---

<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:** [January 18, 2023, 7:30pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/2 "2023-01-18T19:30:56Z")

</div>

Hi, @BrHunt 👋 Thanks for reaching out. Let’s start with the v4 example. For your request, what were the values used for fromObjectType and toObjectType? Also, can you post your request? I am happy to spin up a Private app and see if we can isolate the missing scope(s).

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![BrHunt](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@BrHunt](https://community.hubspot.com/u/BrHunt)\
**Post date:** [January 18, 2023, 9:13pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/3 "2023-01-18T21:13:01Z")

</div>

Jaycee, thanks for the reply.

Let’s start with two from V3:

[https://api.hubapi.com/crm/v3/associations/contacts/companies/batch/read](https://api.hubapi.com/crm/v3/associations/contacts/companies/batch/read)

[https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/read](https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/read)

Both return 403 Forbidden.

Thanks.

Bryan

---

<div class="post-metadata">

**Author:** ![BrHunt](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@BrHunt](https://community.hubspot.com/u/BrHunt)\
**Post date:** [January 18, 2023, 10:03pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/4 "2023-01-18T22:03:33Z")

</div>

Jaycee,

Interesting… I am have some luck with V4 endpoints now. I believe that I had some malformed URL requests. When I saw the 403 Forbidden, it made me believe that it was an Authorization issue. What was really happening was a malformed request. Poor choice of return code I think…

Anyway I will do some more testing and report back here.

Thanks.

Bryan

---

<div class="post-metadata">

**Author:** ![BrHunt](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@BrHunt](https://community.hubspot.com/u/BrHunt)\
**Post date:** [January 18, 2023, 11:02pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/5 "2023-01-18T23:02:43Z")

</div>

Jaycee,

I believe that I have what I need now for V4 associations.

Can I ask you a couple of questions about them?

1. It appears that creating one association actually makes two associations? Bi-directionally? For instance, I created a single contact-\>company association, but both entities point to each other, which is perfect.

2. I ran the create POST several times to see if it would duplicate the association. It looks like the back-end is smart enough to know that the association already exists, and does not duplicate it. Does this sound right to you?

3. As part of one process I need to run, it would be helpful to see ALL associations between two object types (let’s say associations between contacts and companies). I can’t seem to find a way to do that. I can find all associations for a single object, but want to find ALL associations between all contacts and all companies. Is it possible to do that?

Thanks.

Bryan Hunt

---

<div class="post-metadata">

**Author:** ![himanshurauthan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/himanshurauthan/32/53076_2.png) [@himanshurauthan](https://community.hubspot.com/u/himanshurauthan)\
**Post date:** [January 19, 2023, 5:53am UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/6 "2023-01-19T05:53:38Z")

</div>

Hello @BrHunt

This occurs if you have either not provided the respective scopes in your app or you might have reached the limit of the number of associations for your HubSpot plan.

For further information, you can refer to this [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/associations).  
Thanks

---

<div class="post-metadata">

**Author:** ![BrHunt](https://avatars.discourse-cdn.com/v4/letter/b/a9a28c/32.png) [@BrHunt](https://community.hubspot.com/u/BrHunt)\
**Post date:** [January 19, 2023, 1:20pm UTC](https://community.hubspot.com/t/associations-endpoints-giving-403-forbidden-errors/72998/7 "2023-01-19T13:20:26Z")

</div>

Himanshu,

Thanks for the reply.

It turns out the the error was from a malformed request rather than a rights issue. Poor choice of return code for this type of error.

In any case, I seem to to be operational under v4 endpoints now.

Thanks.

Bryan Hunt
