I’m a bit stuck. Reached out to a developer, to support, and writing here now.
I am setting up an API via API Connector and keep getting the same error. It uses OAuth2 User-Agent Flow. App ID is correct, Secret Key is right, redirect URL is correct and matches the one in Google Cloud Console.
I use “login/signup via social network” (via Gmail API) and it successfully calls Google Login Auth. I give consent. Then once returned to the app the error shows that access token is missing or empty.
The setup in the API Connector is as follows. There is not an option I haven’t tried yet. I dried out ChatGPT of answers. Googled stuff, visited forums. If this is your expertise, I would appreciate your help.
Take time to read the bottom part of auth. This is saying that you didn’t test in run mode. You first need to do that to be able to initialize call. You will also need to do it again once the access token expire because Bubble doesn’t refresh it in API connector. Bubble only refresh the token for users.
That is what I don’t understand. I ran the app in run mode in “version-test” and “version-live” and live without the “version” parameter in URL, and each time I get the message that the access_token is empty.
Enable the Authentication goes in the header. Also, be sure to have all requested scopes for me endpoint.
If I remember correctly, Requesting an access token doesn’t use Basic auth for Google and MS. But it shouldn’t affect your request however. The issue is probably related to Authentication goes in the header checkbox that is unchecked and need to be checked. At this moment, you should see Token name to switch to Header key. You should leave it as Authorization: Bearer
It will be hard to debug but you can check with a service like beeceptor to see the access token sent by Bubble (replace the me endpoint by the beeceptor endpoint. It won’t initialize you auth because no ID will be found… but you will see the request). What I believe is this could be related to MS directory or API key settings on MS side. The error is not the same as before, so the header auth is included… but the access token… ?! This is why I suggest to use beeceptor. But technically, your authorize and token endpoint look good from what I see because the error is from the me endpoint