Closed gregoriosw closed 6 years ago
The only thing that jumps out at me is that you used double quotes around the URL. Try again and make sure you don’t use double quotes?
The double quotes were just to distinguish what I'd written!
I've tried
acc mastodon set base_url https://mastodon.org.uk/api/v1 as it is and produces:
mastodon - Logging in: Login
@root | mastodon - Logging in: Parsing application registration response 17:09:40 @root | mastodon - Logging in: Error: /api/v1/apps returned status code Error while writing HTTP request
17:09:40 @root | mastodon - Logging in: Signing off..
Not sure the instance has the api in the right place as it is not mine.
Hm, that is strange. I have no idea… Do you feel like exploring the API using a command line client like curl? Perhaps the API is behind a redirect and the plugin doesn’t follow redirects?
curl https://mastodon.org.uk/api/v1 produces nothing. curl https://mastodon.org.uk/ produces
You are being redirected.I've contacted the server owner @xvilo to see what is going on with the server itself.
This would be more detailed instructions: https://github.com/tootsuite/documentation/blob/master/Using-the-API/Testing-with-cURL.md
Also, the access token should be in a hidden setting for your account, in other words available from the xml file with your settings or using the appropriate command, perhaps account Mastodon set access_token.
Or was it consumer_secret? Mastodon.c has the settings, see mastodon_init.
Thanks for mentioning me here! I’ve been using an iOS app for mastodon, which, I assume, uses the api too!
I do have a small script that sends tweets to the instance over the API. I will check tomorrow if it still works.
It seems the API is working again; I've tested it with a small helper tool I created: https://app.mastodon.org.uk This will generate all the needed API tokens needed for connecting with an instance.
@gregoriosw Will you let me know next time again via xvilo@mastodon.org.uk? Thanks again, and I suppose you can close the issue now.
Is this still an issue, @gregoriosw? There's also the option of running bitlbee in the foreground and setting an environment variable such that all HTTP headers get dumped to stdout… See debugging instructions.
afaik, it's solved
I'm running into this same issue on my personal instance. I'm trying to figure out what to do here but the instructions posted are extremely vague and I'm getting nowhere. Any help (or more detailed explaination) would be appreciated.
@zerojay please try to use my tool over at https://app.mastodon.org.uk. If that doesn't return the results needed, I had to restart all the Mastodon services.
I received a client id and client secret. Looking at mastodon.c's mastodon_init function, I see it having a "consumer_key" and "consumer_secret" (why are they named differently?)
I attempted to add the consumer_key and consumer_secret (which appears to be undocumented in the setup docs for this plugin) and then I attempt to sign in. I get the message from mastodon_oauth with the link to authenticate. I give it the authentication and paste the number back to mastodon_oauth when I get the following back:
12:03 @root mastodon - Logging in: Requesting OAuth access token 12:03 @root mastodon - Login error: OAuth failure (Error while writing HTTP request) 12:03 @root mastodon - Logging in: Signing off..
This is further than I was previously.
They have different names because the code started out as a copy of the Twitter code in Bitlbee. If you disable Bitlbee as a service and run Bitlbee directly without daemonizing it, you will get it's log output. If you set the BITLBEE_DEBUG
variable before you do it, it will also log all HTTP requests. See the debug section in the README. You'll see which request causes the error and you'll be able to test the sequence using curl
. I've used the command line to run the entire OAuth2 thing on my blog, so you should be able to do the same – and compare it with what the plugin does.
I have compiled and installed the bitlbee-mastodon plugin and restarted bitlbee. The plugin is active. However, having entered "acc mastodon set base_url "https://mastodon.org.uk/api/v1" and then "acc mastodon on" I get a " Error: /api/v1/apps returned status code Error while writing HTTP request". Is this related to the instance or am I misunderstand what needs to be done? cheers Greg