Hi Jeffalo! I am currently testing a wasteof.money post creator with Node.js. Here is the source code:
import ky from "ky";
const token =
"token";
onst post = `bing bong`;
const response = await ky
.post("https://api.wasteof.money/posts/", {
headers: {
Authorization: token,
},
json: {
post: `<p>${post}</p>`,
repost: null,
},
})
.json();
const id = response.id;
console.log(`Post is live at https://wasteof.money/posts/${id}`);
This should make a post. To get the token make a post and then go to the Network tab and choose the `posts` request. Find the “Authorization” header and paste it’s value to the “token” variable in the code.
You can also get the token with node.js by making a request to https://api.wasteof.money/session with
json: {
"username": (your username)
"password": (your password)
}
it works like that, i am using it with got
, a node.js library for making requests with javascript
so this is how i made it (you make a post request)
import got from "got";
const { token } = await got
.post("https://api.wasteof.money/session", {
json: {
username: "account",
password: "password",
},
})
.json();