Roblox OAuth2 always receiving 400

I am trying to make a login with roblox feature however my token request is always resolving a code 400, the client id and secret should be correct I’ve checked them and this is my request using js and axios

const result = await axios.post("https://apis.roblox.com/oauth/v1/token", {
    client_id: server.config.security.roblox.clientID,
    client_secret: server.config.security.roblox.secret,
    code: code,
    grant_type: "authorization_code",
}, {
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
})

Could I just be insane and “grant_type” is something else, I don’t know the documentation isnt very clear.

Using the example I was able to receive a token so that narrows it down I guess??? This is driving me crazy and is gonna be a clear issue once I realize what it is

As far as I remember, Roblox legacy api.roblox.com has been shut down? Not too sure.

What are you trying to achieve?

OAuth2 portion of it is still up even if it has been shutdown.

I’m trying to request an api token from the server using the oauth2 authorization code

I just copy pasted the blox auth package’s use with node-fetch and that worked.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.