APIs & Integrations

deno
メンバー

How to know Webhook triggered from which account?

解決

I created a workflow extension to help users send SMS when receiving the webhook. I would like to know are there any way to know the webhook trigger from which account?

0 いいね!
1件の承認済みベストアンサー
Willson
解決策
HubSpot Employee
HubSpot Employee

How to know Webhook triggered from which account?

解決

Hi @deno 

 

In the request payload, you should see a new parameter that determines the source of this data. 

 

The specific parameter is the origin object included in the request payload. It includes the HubSpot portalId, extensionDefinitionId, and extensionDefinitionVersionId.

 

An example of this would look something along the lines of the following:

{
    "fields": {
        "appointment_date": "1536019200000",
        "appointment_notes": "30 minute appointment to go over the services contract",
        "appointment_title": "Appointment with Sky"
    },
    "object": {
        "objectId": 34,
        "objectType": "CONTACT"
    },
    "origin": {
        "extensionDefinitionId": 108,
        "extensionDefinitionVersionId": 5,
        "portalId": 99160967
    }
}

This is documented here in our Workflow Extensions Overview, look specifically for the section 'Handling Requests'. See here:
https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

 

I hope this helps!

Product Manager @ HubSpot

元の投稿で解決策を見る

2件の返信
Willson
解決策
HubSpot Employee
HubSpot Employee

How to know Webhook triggered from which account?

解決

Hi @deno 

 

In the request payload, you should see a new parameter that determines the source of this data. 

 

The specific parameter is the origin object included in the request payload. It includes the HubSpot portalId, extensionDefinitionId, and extensionDefinitionVersionId.

 

An example of this would look something along the lines of the following:

{
    "fields": {
        "appointment_date": "1536019200000",
        "appointment_notes": "30 minute appointment to go over the services contract",
        "appointment_title": "Appointment with Sky"
    },
    "object": {
        "objectId": 34,
        "objectType": "CONTACT"
    },
    "origin": {
        "extensionDefinitionId": 108,
        "extensionDefinitionVersionId": 5,
        "portalId": 99160967
    }
}

This is documented here in our Workflow Extensions Overview, look specifically for the section 'Handling Requests'. See here:
https://developers.hubspot.com/docs/methods/workflow-extensions/workflow-extensions-overview

 

I hope this helps!

Product Manager @ HubSpot
deno
メンバー

How to know Webhook triggered from which account?

解決

Hi @Willson 

 

Thank for your reply, the problem has solved now.