Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Yeah it also depends on the time of day, like right now there are 12 online total including private worlds.
Miss Everybody Edits and your old friends? Check out PixelWalker.net and reconnect with the community!
[imghttps://mm.sirjosh3917.com/PW?scale=1img]
Offline
I'm trying to connect to PixelWalker with Python. Authenticating works fine, but the joinkey part gets me a 403 "You must be authenticated to join a world." error. I even tried recreating the HTTP headers, but that didn't work. Any help fixing this would be appreciated.
import requests
api = 'https://api.pixelwalker.net/api/'
headers = {
"Host": "api.pixelwalker.net",
"User-Agent": "Bot",
"Accept": "*/*",
"Referer": "https://client.pixelwalker.net/",
"Content-Type": "application/json",
"Origin": "https://client.pixelwalker.net",
"Connection": "keep-alive",
}
login = {
"identity":"email",
"password":"password"
}
auth = requests.post(api+'collections/users/auth-with-password', login, headers).json()
print(auth)
headers.update({"Authorization": auth["token"]})
world = requests.get(api+'joinkey/pixelwalker_2024_12_29/legacy:PW01', json=headers)
print(world.text)
edit: I changed my code to use httpx, and so far it works. I don't know the details, but it might be related to requests using TLS 1.2.
Offline
I'm trying to connect to PixelWalker with Python. Authenticating works fine, but the joinkey part gets me a 403 "You must be authenticated to join a world." error. I even tried recreating the HTTP headers, but that didn't work. Any help fixing this would be appreciated.
import requests
api = 'https://api.pixelwalker.net/api/'
headers = {
"Host": "api.pixelwalker.net",
"User-Agent": "Bot",
"Accept": "*/*",
"Referer": "https://client.pixelwalker.net/",
"Content-Type": "application/json",
"Origin": "https://client.pixelwalker.net",
"Connection": "keep-alive",
}
login = {
"identity":"email",
"password":"password"
}
auth = requests.post(api+'collections/users/auth-with-password', login, headers).json()
print(auth)
headers.update({"Authorization": auth["token"]})
world = requests.get(api+'joinkey/pixelwalker_2024_12_29/legacy:PW01', json=headers)
print(world.text)
edit: I changed my code to use httpx, and so far it works. I don't know the details, but it might be related to requests using TLS 1.2.
Is the next fix good enough ?
import httpx
api = 'https://api.pixelwalker.net/api/'
headers = {
"Host": "api.pixelwalker.net",
"User-Agent": "Bot",
"Accept": "*/*",
"Referer": "https://client.pixelwalker.net/",
"Content-Type": "application/json",
"Origin": "https://client.pixelwalker.net",
"Connection": "keep-alive",
}login = {
"identity": "email",
"password": "password"
}try:
with httpx.Client() as client:
auth_response = client.post(api + 'collections/users/auth-with-password', json=login, headers=headers)
if auth_response.status_code != 200:
print(f"Authentication failed. Status code: {auth_response.status_code}, Response: {auth_response.text}")
exit()auth = auth_response.json()
if "token" not in auth:
print(f"Authentication response is missing 'token': {auth}")
exit()headers.update({"Authorization": auth["token"]})
print(f"Authenticated successfully. Token: {auth['token']}")world_response = client.get(api + 'joinkey/pixelwalker_2024_12_29/legacy:PW01', headers=headers)
if world_response.status_code != 200:
print(f"Failed to join the world. Status code: {world_response.status_code}, Response: {world_response.text}")
exit()print(f"World response: {world_response.text}")
except httpx.RequestError as e:
print(f"An error occurred during the request: {e}")
Or that needs some adjustments ?
What are you looking for?
I don't care.¯\_(ツ)_/¯
Offline
[ Started around 1738214722.7787 - Generated in 0.048 seconds, 10 queries executed - Memory usage: 1.41 MiB (Peak: 1.52 MiB) ]