Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Accessing the ROBLOX API - Followers and Followings?

Asked by 6 years ago

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

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
6 years ago

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.

0
Thanks, I kinda pictured it that way myself. sodaghost1 34 — 6y
Ad

Answer this question