I want to make a script that would use an offline player’s username to get their user id, then to get the group rank of an offline user.
There isn’t much online about getting the group rank of an offline user and I’m not that great with API, so I came to ask here. Any help would be appreciated.
You would just need to send a GET request to https://groups.roblox.com/v2/users/{userId}/groups/roles then JSONDecode the response then iterate the decoded data with a for loop then check if the group id in the “group” field matches the group you want and then get the group role from the “role” field
You did answer my question, but how would I make the for loop? Would it be for i, v in pairs() loop, or would it be a for i = 1, #DECODED_DATA do loop?
I’m having another problem. Whenever I try to use Https:GetAsync() with the url you provided (“{userid}” is replaced with an actual userId), I just get an error saying “trust check failed”.