can I see your code?

It’s the exact same as yours, only i put my token in

(i put random numbers for the token here)

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"]}

So yeah, i haven’t change it to harry potter or anything yet, just pasted my token, and that was the only change

View all comments