Skip to content

Instantly share code, notes, and snippets.

@MikMik1011
Created December 20, 2023 23:41
Show Gist options
  • Save MikMik1011/2aa9b9b7ded2ea19212c82d96932a96b to your computer and use it in GitHub Desktop.
Save MikMik1011/2aa9b9b7ded2ea19212c82d96932a96b to your computer and use it in GitHub Desktop.
Discord Nitro Opera GX free generator
import requests
import tqdm
PROMOTION_ID = "1180231712274387115"
DISCORD_BASE_URL = "https://discord.com/billing/partner-promotions"
DISCORD_API_URL = "https://api.discord.gx.games/v1/direct-fulfillment"
def generate_nitro():
headers = {'content-type': 'application/json'}
data = {'partnerUserId': ''}
resp = requests.post(DISCORD_API_URL, headers=headers, json=data)
if resp.status_code != 200:
print("Error generating nitro code: " + resp.text)
return None
token = resp.json()["token"]
return f"{DISCORD_BASE_URL}/{PROMOTION_ID}/{token}"
number_of_codes = int(input("How many codes do you want to generate? ")) # anything over 100-150 will get you rate-limited/ip-banned
file_name = input("What do you want to name the file? ")
with open(file_name, "w") as f:
for _ in tqdm.tqdm(range(number_of_codes)):
output = None
while output == None:
output = generate_nitro()
f.write(output + "\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment