I do everything it says in the errors, it tells me hey copy universe id… I copy universe id now theres a new error. It says “hey check if read/write is enabled for this place” read and write is literally enabled and restricted to be only directed towards this place???
Heres my code pls help guys
i’ve been arguing with ChatGPT + Gemini for like an hour straight while making sure to be as specific as possible yet they can’t fix it literally what’s happening
… I know python a bit and this looks PERFECTLY fine??? what could possibly be the issue all I see are output errors for THINGS I FIXED…
import requests
import random
import time
# --- CONFIGURATION ---
# 1. API Key (Ensure "developer-products" Read/Write is checked in the dashboard)
API_KEY = "kU xKZ1NoUmxwWVlZ dEJUREZfbjN"
# 2. Universe ID (Confirmed Game ID)
UNIVERSE_ID = "9452487574"
# Tiers
prices = [1, 2, 5, 10, 20, 50, 80, 100, 500, 1000, 2500, 5000, 10000, 50000, 100000, 250000, 500000, 1000000, 5000000, 10000000, 50000000, 100000000]
adjectives = ["Epic", "Legendary", "Giga", "Ultimate", "Godly", "Omega", "Insane", "Divine", "Mythical", "Astral"]
nouns = ["Donation", "Gift", "Contribution", "Tribute", "Blessing", "Flex", "Support", "Sacrifice", "Offering"]
def check_connection():
"""Verify if the API key can see the Universe before starting."""
url = f"https://apis.roblox.com/cloud/v2/universes/{UNIVERSE_ID}"
headers = {"x-api-key": API_KEY}
response = requests.get(url, headers=headers)
if response.status_code == 200:
print(f"✅ Connection Successful! Verified Universe: {UNIVERSE_ID}")
return True
else:
print(f"❌ Connection Failed (Error {response.status_code}): {response.text}")
print("💡 Check: Is the game added to the API Key permissions in the Dashboard?")
return False
def create_dev_product(price):
name = f"{price:,} Robux {random.choice(adjectives)} {random.choice(nouns)}"
url = f"https://apis.roblox.com/cloud/v2/universes/{UNIVERSE_ID}/developer-products"
headers = {
"x-api-key": API_KEY,
"Content-Type": "application/json"
}
payload = {
"displayName": name,
"description": f"A generous {price:,} Robux contribution!",
"price": price
}
response = requests.post(url, headers=headers, json=payload)
if response.status_code in [200, 201]:
data = response.json()
prod_id = data.get('id') or data.get('path', '').split('/')[-1]
print(f"✅ Created Product: {name} (ID: {prod_id})")
return prod_id, price
elif response.status_code == 429:
print("⚠️ Rate limited. Waiting 15s...")
time.sleep(15)
return create_dev_product(price)
else:
print(f"❌ Error {response.status_code}: {response.text}")
return None, None
# --- RUN ---
if check_connection():
final_table = {}
print(f"🚀 Starting creation for {len(prices)} products...")
for p in prices:
pid, pval = create_dev_product(p)
if pid:
final_table[pid] = pval
time.sleep(1.5)
if final_table:
print("\n" + "="*40)
print("local DonationProducts = {")
for pid, pval in final_table.items():
print(f" [{pid}] = {pval},")
print("}")
else:
print("🚫 Aborting: Please fix the connection error above first.")