I need to receive a POST request in Bubble, and use the parameters from the request body to generate/validate a signature to authenticate the request.
I decided to create a backend workflow that calls a plugin server action. I had no problem setting up the workflow, and the plugin, but I’m having issues getting the “Request Data” on the plugin side.
Here are some details :
In this image you can see the “Request Data”. I have initialise the request :
Thanks @exception-rambler for taking the time to answer me.
I have tried type “Text” first, and only adventured in “any thing” after reading some stuff in the forums …
The issue with the “Text” type dynamic field in a plugin, is that it gives an error when trying to pass the “Request Data” using that field :
In this particular case I can’t create each parameter from “Request Data” as a separate text field (I will do it, although they are a lot), because the parameters in the “Request Data” are not always equal, they are dynamic, and I need to calculate the signature based only on the parameters (keys and values) that were passed.
So, basically my question is how to pass the “Request Data” to the plugin to work with the keys and values to calculate the signature?
I though this should be simple, because the “Request Data” shows as JSON, at least when you look at it in the “show raw data” in the “API workflow Request Data”…
At that time I think it was not possible to pass the entire Request Data and get it on the plugin action … Don’t know if it’s possible now … What I ended up doing was to pass separately each parameter from Request Data and then have a separate field for each in the Plugin Action.
It’s not dynamic as I wanted, but I was able to make the parameters constant on the request side and work with it …
I received a more technical answer from a Bubble engineer but my knowledge of Bubble was not that high and I might not have understood some of the details, but if you share an email I can search and forward it to you.