I want to send HTTP get requests to Wise’s API. To make these requests, I need to authenticate myself and I don’t wan to send this client-side (using custom code).
How would you solve this in Webflow? Can Logic be used here? I managed to make the call in Logic (server-side), but is the following possible:
Can I trigger the logic on page load?
If 1) is possible, can I pass URL parameters to Logic?
Can I display the data that is returned from Logic in an HTML element in Webflow?
i am not a Logic specialist, but the trigger has to be a form, the hack solution would be to send a form on page load, with some custom javascript and use for the request logic…
The real solution is to use a real backend connected to the page… I use y own, but you can have a look at Xano for example.
BTW you cant send authentification and stuff like that on the client side it generate Cross policy errors
Adding to Romauld’s answer, you would not want to use Logic for this. Each logic transaction costs you a form submit. When you reach your limit, you are charged $0.01 per submit. That’s reasonable for forms, but if you’re triggering a logic request on every single page request…
Also, #3 is a problem. Logic’s form-triggered flows can really only push responses into the CMS, which means you need to build a way to retrieve them. Logic’s webhook-triggered flows are CORS restricted from client-side calls ( last I checked ).
The idea is you’d make an unauthenticated request client-side (on page load) to NoCodeAPI, which then in-turn can make an authenticated request - storing credentials on their servers - to Wise.
NoCodeAPI then gives you caching capabilities so if you do this on every page load, and as long as each and every page load request is not unique, you’d have that data cached for increased speed, reduced costs, and not blowing through your Wise API limits.
NoCodeAPI is exactly what I’m looking for and with very reasonable pricing as well! My other option would be to host my bubble app on a subdomain (or iframe it) and let Bubble handle all the API calls. That would, however, result in a poorer user experience.
That being said, Bubble is a boss at handling API calls so it will be interesting to compare it to NoCodeAPI and similar services.