Troubles with the gamejoin API

Hi, I’m trying to use the roblox GameJoin API to get info on a server through programs outside of roblox. I’m currently doing this with python but I’m sure it works very similarly in other languages. Here is my code:

import requests

cookie = ".ROBLOXSECURITY Cookie" # this is changed to my actual cookie. Only the token itself is added, nothing else.

url = 'https://gamejoin.roblox.com/v1/join-game-instance'
myobj = {"placeId": 9414511685,
         "isTeleport": False,
         "gameId" : "58fff6db-dd4a-47e2-b8a2-76a9644141f7",
         "gameJoinAttemptId" : "58fff6db-dd4a-47e2-b8a2-76a9644141f7"}

headers = {
     "Referer": f"https://www.roblox.com/games/{9414511685}/",
     "Origin" : "https://roblox.com",
     "Cookie" : f".ROBLOSECURITY={cookie}; path=/; domain=.roblox.com;",
     "User-Agent": "Roblox/WinInet"
}

x = requests.post(url, json = myobj, headers = headers)

print(x)

This was my attempt at using the api but I get this response:
<Response [200]>

which contains the following:

{
"jobId":null,
"status":12,
"joinScriptUrl":null,
"authenticationUrl":null,
"authenticationTicket":null,
"message":"Unable to join Game 312",
"joinScript":null,
"queuePosition":0
}

I don’t understand what I’m doing wrong or if there is a better solution but I tried :confused:. My understanding of POST requests is quite limited so any help would be helpful :slight_smile: