I have a situation where I’m using the Bubble API, through the Bubble API Connector, and need to authenticate over it. I’m doing this because Bubble only lets you schedule API Workflows, but not wait for data to return. If you put your own API into API Connector, it lets you do it as an action and await a response. This works fine when using my external React app to interact with the API, as I use the bearer token received when logging in with React. And it works for workflows that do not require authentication internally.
However, now I need to access an authentication-required workflow from within Bubble using Bubble’s own API, which means I need to pass the bearer token of the currently logged in user. I’ve tried grabbing the local cookies with Javascript with document.cookie, but none of the keys I can find ([appname]_debug_mode, [appname]_live_u2main, etc) seem to be a valid token. And there’s no data point for it built in like I would expect like “Current User’s login token”. Any ideas on how to get around this or get the token via Javascript to pass into the workflow?