POST (HttpService)

Im trying to access the friends roblox friends api using :PostAsync() on the HTTPService on Roblox. How does it exactly work?

I’ve ran this code and it returns “HTTP 401 (Unauthorized)”

local HttpService = game:GetService("HttpService")

local url = ""

local data = {
	["targetUserIds"] = "1, 2"

print(HttpService:PostAsync(url, HttpService:JSONEncode(data), Enum.HttpContentType.ApplicationJson))

You need to use authorization

It’s not about Roblox but it has info that should be useful for you