I am trying to create a script that can detect when a user’s Roblox account is linked to RoVer. My only issue is that I am currently having trouble settings the “Authorization” header. The current code returns HTTP 400 (Bad Request), however when I put "Bearer " before the API_Key, it returns HTTP 404. Help greatly appreciated!
game.Players.PlayerAdded:Connect(function(player)
local endpoint = "https://registry.rover.link/api/guilds/" .. Guild_ID .."/roblox-to-discord/" .. player.UserId
-- Get info from endpoint
local result
local success, info = pcall(function()
result = game:GetService("HttpService"):GetAsync(endpoint, true, {Authorization = API_Key})
end)
if success and result then
result = game:GetService("HttpService"):JSONDecode(result)
print(result)
-- show gui saying: account successfully linked!
else
print("Error linking " .. player.Name .. ": " .. info)
end
end)