This is a documentation page on how to connect Session 42 Studios' ranking system to a ROBLOX script. Before you proceed, make sure you already read this: https://session42studios.freshdesk.com/support/solutions/articles/101000393994



Basically, we will use ROBLOX's GetAsync function for HTTP requests.


Step 1: enabling Studio API and HTTP requests


Go to the Studio's 'Home' tab > 'Game Settings' (make sure your game is published to ROBLOX). Go to the 'Security' category and enable 'Enable Studio Access to API Services' and 'Allow HTTP requests'.




Step 2: get the HttpService


local HttpService = game:GetService("HttpService")


Step 3: send the request


We suggest you store your cookie inside a variable so it is easier to use.


local URL = "https://session42-ranking.herokuapp.com/group/"
local Cookie = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_BCC5568CF86F831B0F365D469C067ED24F09091953C9D5F42CA4EB08AC4B864A1967E85EA943946B539C95A0618D6....."


Now, you will want to set variables for every change you make (e.g. Group ID, role ID, etc.):


local URL = "https://blueberry-ranking.herokuapp.com/group/"
local GroupId = 10000
local Cookie = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_BCC5568CF86F831B0F365D469C067ED24F09091953C9D5F42CA4EB08AC4B864A1967E85EA943946B539C95A0618D6"


This is a full example on how to rank someone on join:


--// 3rd party data
local HttpService = game:GetService("HttpService")
local URL = "https://session42-ranking.herokuapp.com/group/"
local groupId = 12992854
local roleNumber = 22
local Cookie = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_BCC5568CF86F831B0F365......."


game.Players.PlayerAdded:Connect(function(plr)
local url_with_data = URL.."rank?user_name="..plr.Name.."&groupid=" ..groupId.."&role_number="..roleNumber.."&cookie="..Cookie
local response = HttpService:GetAsync(url_with_data)
local data = HttpService:JSONDecode(response)
end)