Step A) Authorize url. User authorize your app. Get redirected to your app. URL will contain code
Step B) API Connector: use the token endpoint. Use the code from the url (this expire fast, so you must be ready after redirection). Initialize API call. You should get the call initialized correctly like in your screenshot. Save this but before, click on show raw data and copy the access token.
Step C) Create an API endpoint that call user informations for example. Set a header with Authorization and in the value Bearer accesstoken
Continue to create API Calls using C step.
What actually create alot of confusion is that your are using a authorize url ā¦ This is only if you want, for example me, to give YOUR app authorization to make API call on behalf of me. This is what we call an authorize code grant. If you donāt need that, and want to use YOUR credentials (your bot for example) or if you plan to ask user to provide their API key and secret, your will use client credentials.
But all of them will need you to set none for the Bubble authentication part because you are doing this manually.
Actually, some of your screenshot show it work.
So the first question to answer is: who will authenticate? You? Your Bots added to their app? Your user? Each of them have a different process.
i have the add bot to guild DisList.Me Contributor Profile | Bubble just look at the plugin calls i have everything needed but just this access_token exchange is the confusing part for me so please give me a few to go over what you typed like i said im visual
again your a blessing in disguise btw lol
yes m8 ive done everything made a bot api for bot calls with a none or selfhandled but i try setup the token exchange via that api plugin its a no go its unauthorized to make call
I have oauth plugin to handle oauth
and the 3rd plugin being dealt with atm is this darn token exchange lol so idk why its not working this plugin works fine but once i add to bubble it cant get access token or save it or anything
I will re-attempt to add the call via my bot api as its none or selfhandled once again but if i get same error from a proper setup its just more wasted time ive been up 4 days and on this 8 days
yes i know my token and secret there but you cant see it all and the Bot documentation area one is a fake so no issues there just to explain how its put in
i tried with out those headers got errors lol - discord is fussy with there api calls kinda lol but cant blame them when you got millions of accounts to keep secure
funny how with one line of code POOF this can work but bubble its been nothing but jumping hoops to get it too work (i do hope if you read this bubble.io team you consider making this easier for users in future)
but this would still provide me the bots token and not the users access_token which is all i need to thus then add the user to my server on discord boom solution found
Hey @Jici this repsonse below is my bots token from the api like stated
i can using loom if you give me some time to get it all setup on my pc but more or less it will be a long video thats the issue at hand as id be showing you everything step by step from the plugin to the login to the saved code from url to db to the access token maybe im doing this wrong my end to swap the code for token lets find out from the video lol if you had google remote desktop https://remotedesktop.google.com/support it make both our time easier tbh its secure as well
@Jici heres a video i dont know if im doing things right here but as you see the code is saved to user as well so i know im using parameter right to obtain ?code=this_value_obatined_here
Thereās no sound on your video so I cannot hear comments.
Actually Iām more lost on your issue because you seem to use the Signup/login using social network from Bubble using API Connector auth āoAuth2 User-agentā. If this is the case, you donāt need to care about the authentication. Bubble will handle all of that for you.
Also, in your video, I didnāt see you asking to authorize your Bot, only user scopes. So you cannot use your Bot to make request.
Please, share your API Connector settings too and your authorize url if you are doing stuff manually
your not understanding the need of the access_token i need this token to allow my bot to add user to my discord server after logging in hence in video i run my mouse over the - join to guild - in the oauth of discord anyways i got the code working but now am being provided wrong token i know its not wrong token as i will show u in another video using a test account
anyways i got the code part fixed but now its the token exchange for the code is the issue i know the code works to get the token cause i run it threw the plugins and it works like i will show in video just give me a few also good morning m8
i pray and hope this helps you in understanding what im attempting todo Discord Developer Portal is the source for what im attempting todo add-guild-member
please note i have it working to get code i cant save data or call data from db as it expires in that time frame so i get data from url for the token exchange and move on to my next steps (which now tbh is the farthest ive been in this whole issue in 9 days and counting )
refresh said token with new refresh_token and use that new access_token provided to add member to guild and refresh token one last time for a security measure on my sites end but i cant get the token to come back right keeps giving me wrong token but yet as we see in video im using the same calls and everything so im confused
No you donāt need the access token to allow your bot. You need to add ābotā scope to the list of scope in the authorize request. When you do that, the user first authorize your app to access user account and a second authorize screen will ask to add bot.
Check my manual example (In my example, Iām using manual auth processā¦ but you can probably use the oAuth User-Agent flow too. But split the Bot calls into another API in this case):
First: Get authorization for user AND bot: https://nimb.ws/vC615H ā¦ check my scopes list that include bot. Also need to include permissions parameters. Check the authorize screen that ask me twice to authorize. First my user account and second to add bot with admin rights.
Second: Call with Access token from user after the code and call with bot token.