Automatically create webhook endpoints for each user


I need help acomplishing the following scenario:

I have an external API that mimics Whatsapp Web for my users. For each user, I need to initialize an instance (like a virtual machine), generate a QR Code so my user can scan it and my app send messages automatically from there.

The problem is: for each user’s instance, I have to set a Webhook URL so that It can receive events like when the instance was disconected and the user needs to scan the qr code again, etc. Every instance will post events to its endpoint based on that specific user’s whatsapp number activity.

So I need to create some automated rule that every new registered user, I will need to generate an endpoint to set as the webhook URL for that User’s Whatsapp instance.

Is that possible?

Hello @dantearaujo and welcome to Bubble.

There’s no way to create a webhook without the editor. If you absolutely need it, you have to implement a browser automation solution (there’s a lot tools outside) that will create the unique webhook for each user. The easiest solution will be having only one webhook and detected which user is asking for info.

I see, thanks a lot. The problem is that the API right now doesn’t send in the POST what user/instance it’s refering to, that’s probably something I’ll need to implement on the API itself, so i can capture this info on bubble and split the events from there.

1 Like