A (possible still broken) wget invocation that would get a token (we've managed to register an oauth app and had the network die on us once more when trying to get a token; what made it more annoying that it should have been is that that wget was old enough not to support storing bodies of errors, so there was lots of guesswork involved).
@robryk @timorl @a3000ux Registering an OAuth app seems overkill - signing in and getting a token should be enough. I just signed into the account from a regular web browser and copied the token. First attempt at wget was a 200 to my surprise, and looking at the file it saved, it was indeed successful (container JSON). I never used the Mastodon API before, so I only looked up how to post and did everything else on another machine in a browser.
We didn't think of using lynx to log in, and the way via an oauth app seems to be the only way that's supposed to be non-interactive.
(What we messed up along the way which would have made error printing useful:
- not set Content-Type,
- typoed a field name in request,
- something else that I don't remember.)