Skip to main content
Answered

How to identify from which user/account/workspace a webhook notification generated?

  • May 4, 2021
  • 1 reply
  • 59 views

  • New Participant

Hi Team,

I'm trying to create a webhook for my app that having OAuth authentication (i.e. Intercom users can install my app on their account/workspace). In my app, users can create separate functions to be executed for each type of intercom notification topic e.g. 'contact.created' topic triggers function1 and 'company.created' topic triggers function2 ...etc. So for example, if user1 creates 2 different functions for 'contact.created' & 'company.created' and another user2 creates few more functions for different notification topics for that user's account/workspace.

 

With webhooks how do we distinguish from which user or workspace the notification is generated? Webhook json payload does not seem having any field that allowing me to uniquely identify user/account/workspace where the event occur? or am I missing something?

thanks

Best answer by Eric Fitz

Hey @dnk​, the webhook model returns an `app_id` field as well as `id` and `user_id` parameters for the user object.

 

The `app_id` field will allow you to determine the workspace.

View original
Did this topic help you find an answer to your question?

1 reply

Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • Answer
  • May 10, 2021

Hey @dnk​, the webhook model returns an `app_id` field as well as `id` and `user_id` parameters for the user object.

 

The `app_id` field will allow you to determine the workspace.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings