You could save your time from generating code and expecting players to join game and write in the code, by actually using Roblox’s OAuth 2.0
You can read more about it in this post
How ever you will require your own web server and a datastore to link the discord account tot he Roblox account.
Thats pretty neat, Would it be theoretically possible to do something like
“/robloxverify” on a custom discord bot which redirects you to that oauth link?. then if you click “verify” check if verified in game
Yes that exactly what I did for mine, the user would run /verify and the bot would reply with a button to the OAuth page. Roblox allows you to get certain information when verifying such as the User ID so they wont actually need to join a game to confirm.
What scopes would i need on the OAuth setup in order to say store a value in a datastore when the user clicks verify. or can you check from in game whether they’re verified or not.
openid and profile scopes, they are both identity scopes which will return information about the user,
if you select profile scope you will need to select openid scope as stated here
Alright,
i’ve added the scopes and what not but do i need to do anything with the entry link?
Like after i create it and it gets published what will be the url i put through the discord bot which they click to take them to the “authorize” page
for the entry link i do not know much since I was only trying out but the URL that the bot sent was like this
https://authorize.roblox.com/?client_id={CLIENT ID}&response_type=Code&redirect_uri={REDIRECT LINK}&scope=openid+profile
I’m guessing with entry link you can make that shorter, so I suggest using it.
im just asking whether i need it or not for the actual verification, but in the url example you provided me rn. id assume that the redirect link is a must have. what exactly do i put for that?
the redirect URI must be the redirect link you set in the the scope yourself earlier, since its for the actual verification system i recommend using the entry link, I’m guessing it would be your link > ROBLOX OAuth > your redirect link
I never set a redirect earlier
Neither do i see it on the image (i havent published this yet)
I need to make sure i can set it up properly before publishing. but i cant get the redirect for the entry link
All the doc says is
Ye so I think the entry link is meant to take you to the long URL I sent earlier. I do not know if the player is automatically redirected to the app or you will have to do it yourself.
I dont have or need a redirect url so do i remove that part?
https://authorize.roblox.com/?client_id={CLIENT ID}&response_type=Code&scope=openid+profile
redirect url is needed because the Roblox OAuth will send info to the redirect URL, at the redirect URl is where you will link the discord user to roblox user and then change the database to confirm verification
so essentially i need to get the link to my discord bot and put that for the redirect? Sorry, theres really not much information about how it works so its hard to understand…
redirect url should be a page you own, you can listen from GET requests in this page and retrieve the info you got from the Roblox OAuth when they redirect the user to your page
i dont know what you mean by “page” i dont have a website or anything.
You could just redirect to a web server your bot is hosting, then your bot collects info and redirects the user to any other link you want.
the OAuth thing is pretty good but that seems quite complicated.
Wouldn’t it be just simpler to gen the code on discord, upload to firebase
once you have it, paste it into roblox and check if its in the database then reward and clear it?
You could but OAuth is much faster for verification in my opinion,
If you do plan on using the OAuth check out this post