0

Is it possible to get the deeplink data from a link that was just created? I would like to persist the link data also in my own database when a user creates a new link.

is this possible? thank you very much for your help.

EDIT: I already created a webhook, which triggers on click. And I fire a userCompletedAction('click') right after creating the link. But I guess this webhook would fire every time some user triggers the pre-defined "click" event. when I use a custom event like userCompletedAction('link-created'), the webhook doesn't send the link data with it (as stated in the docs)

malua
  • 117
  • 11

1 Answers1

0

Alex from Branch.io here: the webhooks system isn't designed to capture link data the way you're describing, but there are a couple of ways you can build this yourself:

  1. Pass a copy of the data to the webhook through a custom event. If you're only interested in any custom parameters you're setting, you can push those into the link and send them separately in the custom link-created event you're defining.
  2. Retrieve the link data and record it. If you really want ALL the link data, you can take the link URL that is returned from link generation function, pass that into the link status API endpoint, and then do whatever you want with the returned data (either to a webhook through a custom event as above, or directly to your own back end)
Alex Bauer
  • 13,147
  • 1
  • 27
  • 44