Answered

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

  • 4 May 2021
  • 1 reply
  • 31 views

  • New Participant
  • 0 replies

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

icon

Best answer by Eric Fitz 10 May 2021, 12:46

View original

1 reply

Userlevel 1

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.

Reply