Token header is “Authorization” (yes, with a ‘z’)

Oh ok.. now 404 user not found

import requests, os, json
user = os.environ["User"]
passw = os.environ["pass"]
data = {"username":user, "password":passw}
token = requests.post("https://api.wasteof.money/session", json=data).json()["token"]
print("Done!",token)

post = requests.post(f"https://api.wasteof.money/users/{user}/wall",headers = {"Authorization": token}, json={"content": "Hello!"})
print(post,post.json())

Oh wait. It works when I type username manually in link lol

Thanks!! I made a mistake in username lol (everything needs to be lowercase)

View all comments