API Connector - Expose API URL on click

Hello! I’ve been looking everywhere but I couldn’t find anyone talking about it. Is there a way to make the API URL exposed and available on click by the user?

I’m picturing something similar to what we do when setting up an API workflow, in which we click the “Detect Data” button. The screen shows the waiting message with the URL and waits for a call. But I wanted to make it available for the end user.

The whole reason for that is that I don’t want it to create a record in the database and the final goal is for users to be able to see (and eventually do stuff with) the body of the call they made in the screen, similar to what webhook.site does.

Is there any way to do that without custom plugins? If not, any idea on how to do it using a custom plugin? :sweat_smile:

This is not really something you can do in Bubble.
First of all, you will need to use backend WF to accept GET and POST requests. You will not be able to accept DELETE, PUT, PATCH,HEAD… requests
Also, Bubble doesn’t allow you to have the same name for two endpoint even if they are different method. You will need to create DB thing with the content of the request. Finally, you cannot create backend WF endpoint dynamically.

The only option I could see is to use a third party tool that will receive the request and send it to Bubble after (you could have a button click that generate a custom URL like requestbin or webhook.site does from bubble, but you will need to store data into DB to match the unique ID with the server response)

Thanks for the reply! Well, it doesn’t have to be a new URL everytime, nor it’ll have to accept different protocols. I would only need to receive POST requests, and the URL could be the same. The major point would be to be able to expose it and “listen” to a request at the spot.

But I understood your point. I don’t think it’d be possible without a very specific plugin or an outside tool, so I’m gonna try another approach. Maybe work with the DB but delete the record soon after.

Thanks for the suggestions!

So in this case, depending on how far you want to push this, yes this is possible, but not without creating DB thing.
You need to create a backend WF. Name it like you want. Use request data, but set detect headers. Initialize the endpoint with an empty payload and save.
Send anything you want in form url encoded or JSON and you can save it to a DB text field using the request data’s raw body
You could save some more header too, but there’s no “raw headers” option available actually. Saving the content-type may be a good idea… But I don’t know what you want to do with the data at the end