# "Endpoint does not accept EXTERNAL hapikeys" with Associations endpoint

**URL:** <https://community.hubspot.com/t/endpoint-does-not-accept-external-hapikeys-with-associations-endpoint/13383>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [March 7, 2019, 4:00am UTC](https://community.hubspot.com/t/endpoint-does-not-accept-external-hapikeys-with-associations-endpoint/13383 "2019-03-07T04:00:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwatts1980](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jwatts1980/32/80621_2.png) [@jwatts1980](https://community.hubspot.com/u/jwatts1980)\
**Post date:** [March 7, 2019, 4:00am UTC](https://community.hubspot.com/t/endpoint-does-not-accept-external-hapikeys-with-associations-endpoint/13383/1 "2019-03-07T04:00:36Z")

</div>

I am attempting to make API calls to the Association endpoint. But am getting an error “This endpoint does not accept EXTERNAL hapikeys”. Please see from my log below, my application made a successful call to both the deals endpoint and the line items endpoint, then failed on the associations call. In this case, the association is a “Deal to Line Item”, in case that matters.

(Note: request IDs are YYYYMMDDHHMMSSmmm)

HubSpot Account ID: 5018168

- Begin get request 20190307033728233 to [https://api.hubapi.com/deals/v1/deal/paged?limit=250&properties=nf\_inv\_code&properties=nf\_cst\_recno&properties=dealname&properties=dealstage&properties=amount&properties=createdate&properties=closedate&properties=pipeline&properties=dealtype](https://api.hubapi.com/deals/v1/deal/paged?limit=250&properties=nf_inv_code&properties=nf_cst_recno&properties=dealname&properties=dealstage&properties=amount&properties=createdate&properties=closedate&properties=pipeline&properties=dealtype).  
- Request 20190307033728233 completed and response parsed.  
- Retrieved 5 deal(s).  
- Begin get request 20190307033759396 to [https://api.hubapi.com/crm-objects/v1/objects/line\_items/paged?properties=nf\_inv\_code&properties=nf\_prd\_key&properties=name&properties=description&properties=quantity&properties=amount](https://api.hubapi.com/crm-objects/v1/objects/line_items/paged?properties=nf_inv_code&properties=nf_prd_key&properties=name&properties=description&properties=quantity&properties=amount).  
- Request 20190307033759396 completed and response parsed.  
- Retrieved 7 line item(s).  
- Begin get request 20190307034021636 to [https://api.hubapi.com/associations/v1/associations/466032186/HUBSPOT\_DEFINED/19?limit=100](https://api.hubapi.com/associations/v1/associations/466032186/HUBSPOT_DEFINED/19?limit=100).  
- (HSUnauthorizedApiException) HTTP 401. Unauthorized access. See inner exception.  
- (Exception) HubSpot Message: This endpoint does not accept EXTERNAL hapikeys, and has no special allowances for this hapikey (\*\*\*\*\*\*\*\*-\*\*\*\*-\*\*\*\*\*\*\*\*\*-8b47f51d20ef). hapikey auth configuration for this endpoint: HapikeyAuthenticator{allows=INTERNAL}

---

<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:33am UTC](https://community.hubspot.com/t/endpoint-does-not-accept-external-hapikeys-with-associations-endpoint/13383/2 "2019-03-07T10:33:03Z")

</div>

Hi @jwatts1980 , the issue should be due to the associations endpoint you are using is incorrect. The correct endpoint is

`https://api.hubapi.com/crm-associations/v1/associations/:objectId/HUBSPOT_DEFINED/:definitionId`

instead of

`https://api.hubapi.com/associations/v1/associations/466032186/HUBSPOT_DEFINED/19?limit=100`

The endpoint you’re using is missing the /crm-associations/v1/ path. You can refer to the doc here for examples: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/methods/crm-associations/get-associations)

---

<div class="post-metadata">

**Author:** ![jwatts1980](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jwatts1980/32/80621_2.png) [@jwatts1980](https://community.hubspot.com/u/jwatts1980)\
**Post date:** [March 7, 2019, 3:02pm UTC](https://community.hubspot.com/t/endpoint-does-not-accept-external-hapikeys-with-associations-endpoint/13383/3 "2019-03-07T15:02:32Z")

</div>

Thank you! You were absolutely correct. I had that same documentation page up, but the way the text was breaking in my browser, I completely missed the “crm-” prefix in front of “associations”. I must have looked at that link 20 times and missed it every time 🙂

 ![3-7-2019 8-43-06 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/3/a38d1d6307bbc81f4fd60192b2c292753f9cb506.jpeg)
