"HttpService is not allowed to access ROBLOX resources" when not attempting to

Whenever I run the following code in my game (with other code of course) I get the error, HttpService is not allowed to access ROBLOX resources which is confusing me entirely on that I am not attempting to access the Roblox API.

game.HttpService:RequestAsync({
Url="app.foxtrot.institute/API/quizPass/"..plr.UserId,
Method="Get",
Headers={
["Token"]="tokenwouldbehere" }
}) 

Any help would be appreciated, thanks.

You need to specify that you’re trying to access an external resource, in this case append http:// or https:// depending on whether your application is listening on port 80 or port 443 to the url, like so: Url="http://app.foxtrot.institute/API/quizPass/"..plr.UserId,.

Additionally, Get isn’t a valid HTTP method (case-sensitive!).

Result should be…

game:GetService("HttpService"):RequestAsync({
    Url = "http://app.foxtrot.institute/API/quizPass/" .. plr.UserId,
    Method = "GET",
    Headers = {
        ["Token"] = "tokenwouldbehere"
    }
}) 
7 Likes

Thank you, marked as solution.

4 Likes