How to identify webhook related user?


#1

Hi,

I am building an application that add additional data to contact every time it is created.
I have finished the installation part where I save access and refresh tokens to my DB.
Now I am building webhook part and I don’t know how to identify the user when I get a webhook.
How do I know which access token to use?

Thanks, Nadir.


#2

Hi @Nadir

If you’re using the Webhooks API, each entry in the data you receive will have a "portalId" field, which will indicate the account that the object belongs to.

You can get that same account ID, which will be referred to as "hub_id" by using the endpoints to get the information for the access token or refresh token.