I simply want to send an OAuth key to GitHub’s REST API, but I’m not sure how it would do it. Here’s what I have tried, but judging by the fact x-ratelimit-limit
is still 60
, it does not work:
print(
game:GetService("HttpService"):RequestAsync(
{
Url = "https://api.github.com/repos/BedrockLauncher/BedrockLauncher.Github.io/releases",
Headers = {
token = "ghp_16C7e42F292c6912E7710c838347Ae178B4a"
}
}
).Headers
)
Result:
["x-ratelimit-limit"] = "60", -- should be 5000 if github accepted my OAuth key
["x-ratelimit-remaining"] = "59",
["x-ratelimit-reset"] = "1627323497",
Do note that the OAuth key “ghp_16C7e42F292c6912E7710c838347Ae178B4a
” in this post is not real, but I am using a real one locally (I don’t wanna give your mine).