Unable to GET requests from Discord's API via account

As I’m trying to authenticate into an alternative account to utilise GET requests and such, I had an issue verifying my account and allowing access to it with a token. Whenever I attempt authentication,

{ message: 'Missing Access', code: 50001 }

occurs. Hence, I go to my account’s settings, and it unverified my email - therefore, I verify it again. This time it doesn’t show the same error code, but

{ message: 'You need to verify your account in order to perform this action.', 
code: 40002 }

and it repeats the errors, after verifying my email multiple times to stop this from recurring, and to get the endpoint working. Here’s my code:

local http = game:GetService("HttpService")
local api = "https://discord.com/api/guilds/00000/members"
--00000 to hide the ID

local data = http:RequestAsync({Url = api, Headers = {["Authorization"] = "hidden token"}})
print(data) --error block prints here
data = data:JSONDecode(API) --stops the script here due to error
print(data)

The error occurs in LUA, alongside node.js.

You need a bot account to use the API; self-botting is strictly prohibited.

2 Likes

Thought about this, but wasn’t certain - thanks.