# CRM Extensions API action hook fails (solved)

**URL:** <https://community.hubspot.com/t/crm-extensions-api-action-hook-fails-solved/11783>\
**Category:** APIs & Integrations\
**Created:** [July 17, 2017, 8:43am UTC](https://community.hubspot.com/t/crm-extensions-api-action-hook-fails-solved/11783 "2017-07-17T08:43:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pjp/32/102498_2.png) [@pjp](https://community.hubspot.com/u/pjp)\
**Post date:** [July 17, 2017, 8:43am UTC](https://community.hubspot.com/t/crm-extensions-api-action-hook-fails-solved/11783/1 "2017-07-17T08:43:19Z")

</div>

Hi Forum,

I’m trying to set up interactions with my own site’s database using the CRM Extensions API.  
I’ve successfully retrieved data, and I’m now trying to setup action hooks.

I have successfully used the Iframe action, but when I try to make an action of the type ACTION\_HOOK or CONFIRMATION\_ACTION\_HOOK, the response is “label” failed - handed to me through a toast message.

I’ve now shortened the code to the most basic, but the response is the same. The code used for the action hook:

{ “results”: [  
{  
“objectId”: 246,  
“title”: “xxxx”,  
“actions”: [  
{  
“type”: “ACTION\_HOOK”,  
“httpMethod”: “POST”,  
“associatedObjectProperties”: [],  
“uri”: “[https://example.com](https://example.com)”,  
“label”: “Test”  
}  
]  
}  
] }

By watching network traffic, I’ve found that clicking the link sends a POST request to:  
[https://api.hubapi.com/extensions/sales-objects/v1/actions?portalId=3460228&clienttimeout=7000](https://api.hubapi.com/extensions/sales-objects/v1/actions?portalId=3460228&clienttimeout=7000)  
with the following payload:

applicationId: 52235  
applicationName: “Hotshottest1”  
associatedObjectId: 655  
associatedObjectProperties: []  
associatedObjectType: “CONTACT”  
httpMethod: “POST”  
integrationName: “Hotshottest1”  
objectId: 246  
objectTypeId: 211  
uri: “[https://example.com/”](https://example.com/%E2%80%9D)

And the response is:  
500 Internal Server Error

Do you have any idea how to proceed? Am I missing something, eg. a required scope? The error is similar on a CRM & sales only server and on a full test server.

Thanks  
Peter

Edit:  
The solution was that the action URI needs to be in the list of Base URIs defined in the CRM extension API part of the App. I can’t find this in the documentation.

---

<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:** [January 16, 2018, 3:20pm UTC](https://community.hubspot.com/t/crm-extensions-api-action-hook-fails-solved/11783/2 "2018-01-16T15:20:52Z")

</div>

Can someone at Hubspot Clarify the documentation that the BASE URI needs to be set for ACTION\_HOOK and CONFIRMATION\_ACTION\_HOOK actions to work. Also for some reason the BASE URI does not need to be set for IFRAME actions, adding to more confusion.

---

<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:** [November 12, 2018, 1:05pm UTC](https://community.hubspot.com/t/crm-extensions-api-action-hook-fails-solved/11783/3 "2018-11-12T13:05:39Z")

</div>

I had the same problem: 500 error when performing the action request.  
After setting the app’s base URI - the action request working like a charm!
