Hello,
I am trying to make an application (using python) that has a feature to display a Roblox user’s friends. I want to be able to use the alias that the user has set for their friends, though I cannot get the api to work.
I have tried to do this in Python, though it gives a 401 response of {"errors":[{"code":4,"message":"Invalid parameters.","userFacingMessage":"Something went wrong"}]}
The parameters seem to be as they are when the Roblox website sends a request.
This is my script:
import json
import requests
robloxSession = requests.Session()
robloxSession.cookies[".ROBLOSECURITY"] = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|<--token-->"
req = robloxSession.post(url="https://auth.roblox.com/v2/logout")
robloxSession.headers["Content-Type"] = "application/json"
robloxSession.headers["Referer"] = "https://www.roblox.com"
robloxSession.headers["X-CSRF-TOKEN"] = req.headers["X-CSRF-Token"]
d = {"targetUserIds":[
# user ids of friends
]}
j = json.dumps(d)
req2 = robloxSession.post(url="https://contacts.roblox.com/v1/user/get-tags", json=j)
print(req2.content)
What’s wrong with this? Can somebody help please?
(also if this is the wrong category, i did not know which one to do sorry)