Hi, I was trying to post to wall by API but not working…

It gives me the token but… it doesn’t post to wall and says that I can’t post while i’m logged out

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={"token": token}, data={"post": "Hello!"})
print(post,post.json())

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