Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Accessing the ROBLOX API - Followers and Followings?

I've been trying to access the ROBLOX API in order to get a player's followers and following list with the Http Service. However, ROBLOX doesn't seem to allow me to access their own API using (www.roblox.com/) in the URL. I've been told to use a proxy but I'm not entirely sure how that works...

local HttpService = game:GetService('HttpService')
local Player = script.Parent.Parent.Parent.Parent

local Page = 1
local PageSize = 20
local Followers = {}

local TableJSON = HttpService:GetAsync("https://api.roblox.com/users/followers?userId="..Player.UserId.."&currentPage"..Page.."&pageSize="..PageSize.."&imgWidth=110&imgHeight=110&imgFormat=jpeg", true)
TableJSON = HttpService:JSONDecode(TableJSON)

print(TableJSON)

Anyone's help is much appreciated! :)

1 answer

You pretty much answered your own question. You can't access ROBLOX's API from ROBLOX. Some people have their own hosted servers that you CAN send a request to and then their server will request ROBLOX's API and return what you need. WebGL3D used to host one, search around for his ROBLOX plus API.

1 comment

0

Thanks, I kinda pictured it that way myself.

This discussion is preserved as it was. New answers, comments, and votes are closed.