in the documentation it states there multiple ways to authenticate for bubble API calls. One that i am counting on is:
Session cookie. If the call is done from the browser and there is a session cookies present, the user represented by the cookie will be the call will be run in the context of this user.
As a test i created a plugin, added to my authenticated bubble app page and tried to make the call:
$.getJSON(“https://HOSTNAME/version-test/api/1.1/obj/tablename”), function( data ) { console.log(data); } Where HOSTName is the same as my app so not having any CORS issues.
I am getting {“statusCode”:400,“message”:“Unrecognized authorization type”} as the response.
My purpose for this call is a chrome extension that authenticates and shows a bubble page but also queries table directly once authenticated.
According to the docs, it isn’t required if authenticated.
I have a 200k line app making extensive calls through the APIs serverside, I just need to make some from within the browser. In order to use the token i would need to either expose a security risk or do OAuth workflow too, but that shouldn’t be needed.
Have you tried hardcoding a token?
In this [example] they include an api_token param, so dont think you can get around that. I would try the broadest approach first, then narrow down.
The problem was my version-test environment was user-name and password protected (in settings). If i turn that off it works.
They are treating as a bug still, but at least i can work around it now in dev and it will work in prod.
No token required!