import requests
import json
quote = requests.get("https://api.breakingbadquotes.xyz/v1/quotes").json()[0]
author = quote["author"]
quote = quote["quote"]
print(quote)
authJson = {"Authorization": "[redacted] (029485729345872039456374)"}
post = requests.post("https://api.wasteof.money/posts", headers = authJson, json = {"post": f"<h2>{author}</h2> <p>{quote}</p>"})
print(post.json())

make authJson = {“Authorization”: requests.post(“https://api.wasteof.money/session”, {“username”:”here”,”password”:”pwd”).json()[“token”])}

might be a bit goofed up as I'm in class

might be a bit goofed up as I'm in class

says it’s incorrect, can you put it together pls? sorry :(

what's incorrect? what's the error?

authJson = {"Authorization":requests.post("https://api.wasteof.money/session", json={"username":"username here","password":"pwd here"}).json()["token"]}

View all comments