send { username, password } to https://api.wasteof.money/session
to get a token
no, you need to provide the token returned as an Authorization
header in future requests
// js
fetch(`https://api.wasteof.money`, { headers: { Authorization: <TOKEN>}})
this is untested but should work:
requests.post("https://api.wasteof.money", headers={ Authorization: <TOKEN> })
this will make a post:
import requests
authJson = {"Authorization": "my token"}
post = requests.post("https://api.wasteof.money/posts", headers = authJson, json = {"post": "api test"})
or to get your token:
import requests
requests.get("https://wasteof.money/session", json={"username": "user", "password": "password"})