File size: 1,793 Bytes
5fa78e9
82bbe63
b2d32df
66fa0b2
a33fd06
b2d32df
66fa0b2
b2d32df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66fa0b2
acbe0ec
b2d32df
 
 
 
 
66fa0b2
 
 
 
b2d32df
 
66fa0b2
b2d32df
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import requests

# Define the API URL
url = "https://api.puter.com/signup"

# Define the headers (including all the details you provided)
headers = {
    "accept": "*/*",
    "accept-encoding": "gzip, deflate, br, zstd",
    "accept-language": "en-US,en;q=0.9",
    "connection": "keep-alive",
    "content-length": "130",  # This will be automatically calculated by `requests`
    "content-type": "application/json",
    "host": "api.puter.com",
    "origin": "https://dooratre-yjytjyjtyjtyjtjytj.static.hf.space",
    "referer": "https://dooratre-yjytjyjtyjtyjtjytj.static.hf.space/",
    "sec-ch-ua": '"Chromium";v="134", "Not:A-Brand";v="24", "Google Chrome";v="134"',
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": '"Windows"',
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
    "x-requested-with": "XMLHttpRequest"
}

# Define the payload (request body)
payload = {
    "username": "tdpf6hhhhhtrgrtghhhhhhhQtGu9g",
    "email": "ehsavregergtgrisea@gmail.com",
    "password": "jH%K7RQz7t4@C",
    "send_confirmation_code": True,
    "p102xyzname": ""
}

# Send the POST request
response = requests.post(url, headers=headers, json=payload)

# Check if the request was successful (status code 200)
if response.status_code == 200:
    try:
        # Parse and print the JSON response
        print("Response JSON:")
        print(response.json())
    except ValueError:
        print("The response is not valid JSON.")
else:
    # Print an error message if the status code is not 200
    print(f"Request failed with status code: {response.status_code}")
    print(f"Response text: {response.text}")