Issue with completing group API request

We need to mass demote people due to a bot going rogue in our group, which requires me to create a bot to handle that.

I am currently using the following node.js code to attempt to handle this:

            let url = `https://groups.roblox.com/v1/groups/5598688/users/${data.userId}`
            await axios.patch(url, { body: { roleId: 36926437,Cookie: ".ROBLOSECURITY=" + token} })
            .then(async (res) => {
                console.log(`${data.userID} has been demoted!`)
            })
            .catch(error => {
              console.log(error)
            })

But every time that runs, it just returns the status code 401 (unauthorized request)

Any and all help will be greatly appreciated

and following up, im pretty sure the token is valid, and the bot does have permission to rank the users in the group

1 Like

Never mind, I managed to fix it.

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