I would like to find the join date of a user, even if they are not in-game.
this is the code.
local http = game:GetService("HttpService")
local UserService = game:GetService("Players")
local Channel = "https://discord.com/api/webhooks/XXXX"
local Data = {}
local Player
local UserId = 1916597735
local Age
while true do
Player = UserService:GetNameFromUserIdAsync(UserId)
Age = http:GetAsync("https://users.rprxy.xyz/v1/users/" .. UserId)
Data = {
["content"] =
[[Age]]..Age
}
Data = http:JSONEncode(Data)
http:PostAsync(Channel, Data)
wait(120)
UserId = UserId + 1
end
it returns "HTTP 429 (Too Many Requests), anyone know a fix?
The API seems to be down at the moment, since it is occurring to me as well when I try to fetch this endpoint. Try again after a few hours, or so, it all depends on how long they take to fix it.
local http = game:GetService("HttpService")
local UserService = game:GetService("Players")
local Channel = "https://discord.com/api/webhooks/8529XXXXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXX"
local Data = {}
local Player
local UserId = 1916597735
local Age
while true do
Player = UserService:GetNameFromUserIdAsync(UserId)
Age = http:GetAsync("https://users.rprxy.xyz/v1/users/" .. UserId)
Data = {
["content"] =
[[Age]]..Age
}
Data = http:JSONEncode(Data)
http:PostAsync(Channel, Data)
wait(120)
UserId = UserId + 1
end
Please remove the webhook URL, people can spam the webhook
local http = game:GetService("HttpService")
local UserService = game:GetService("Players")
local Channel = "https://discord.com/api/webhooks/XXXX"
local Data = {}
local Player
local UserId = 1916597735
local Age
while wait(10) do
Player = UserService:GetNameFromUserIdAsync(UserId)
Age = http:GetAsync("https://users.rprxy.xyz/v1/users/" .. UserId)
Data = {
["content"] =
[[Age]]..Age
}
Data = http:JSONEncode(Data)
http:PostAsync(Channel, Data)
end