Hi!
I’m new to plugin development in Bubble.
I’m looking for a way to call a server side method or action from the element’s “initialize” function. Is this possible?
Can I call a server side Actions that is specified on the Plugin?
To clarify… I would like to do something like:
function(instance, context) {
const weavy = new Weavy();
weavy.url = properties.weavy_url;
weavy.tokenFactory = async (refresh) => {
return await invoke('token', { refresh: refresh });
}
}
…where invoke is of course made up, but could be like a bridge between client and server code. To get a new user access token in this case, I need to use an API key that I cannot expose on the client side. So the api request must be made on the server.
Thanks
Magnus