JavaScript Api call

Hey just wondering if anyone has some JavaScript for calling an API from the frontend

1 Like

Why don’t you use the API connector?

There can be speed issues.

A bunch of people write api calls directly.

You can also avoid going through bubbles servers (bubble does have the option to send directly but it’s not always possible)

For me it’s speed

And what about security ? Client side api call will expose sensitive data.

Bubble also have option to do API on client side if possible.

You could set up your call from postman and check out the codesnippets that they provide. You should be able to use the vanilla JS fetch method

1 Like