Is it possible to change a gamepass price using roblox api?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want to change the price of a gamepass using the roblox api in python

Here is my current code:

import requests

cookie = "_|WARNING:-DO-NOT-SHARE-THIS.--Sharing-this-will-allow-someone-to-log-in-as-you-and-to-steal-your-ROBUX-and-items.|_"

auth_response = requests.post("https://auth.roblox.com/v1/logout", headers = {"cookie": f".ROBLOSECURITY={cookie}"})
if auth_response.status_code == 403:
    if "x-csrf-token" in auth_response.headers:
        token = auth_response.headers["x-csrf-token"]
        headers = {
        "cookie": f".ROBLOSECURITY={cookie}",
        "x-csrf-token": token
                    }
data = {
    "isForSale": "true",
    "price": "140"
}   
message_response = requests.post("https://apis.roblox.com/game-passes/v1/game-passes/778571061/details", headers = headers, json=data)
print(message_response.json())   

I keep getting this error:

    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\Users\ADMIN\Downloads\test\hello.py", line 18, in <module>
    print(message_response.json())
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\requests\models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Im not sure why im getting this as all other apis work fine for me and i dont have 2 step enabled

id say the API request is failing and doesn’t return json content. to check this, change

print(message_response.json())

to

print(message_response.status_code, message_response.text)

and see what error is being returned.

For some reason i get status 200 but it doesn’t change the price

Hello, have you solved the problem? If so, how?

Some How, when it sends the post request it send it without any data like pass id or anything, it tried to mimic it but i always get this error {"errorCode":"PassNotFound","errorMessage":"The Pass with ID: 0 was not found.","field":"Pass: 0","hint":null}, and when i took a look on the browser Netword tab it sends to request one Options and then Post witch lead me to thinking that it make an open port for any modifications before it closes it.