Open steve-bate opened 1 month ago
Noticed this in the Mastodon.py docs (for authorization_code grants):
For OAuth 2, obtain a code via having your user go to the URL returned by :ref:`auth_request_url() <auth_request_url()>` and pass it as the code parameter. In this case, make sure to also pass the same redirect_uri parameter as you used when generating the auth request URL.
FWIW, if I use the "Tester" tab from the enable-mastodon-apps plugin settings to create an access token interactively, I can use that token to create, boost and reply to posts in Wordpress.
I've created a proof-of-concept that automates the mastodon client creation with Wordpress by using the interactive authorization code OAuth flow and parsing web pages. :-/ It could probably be generalized a bit if we want to use this approach.
Is this basically the same situation as https://github.com/mastodon/mastodon/pull/30960 ?
The deprecation is probably why password flow is not supported in the PHP library that the WordPress plugin uses.
When the code tries to
log_in
(get an OAuth access token), the response has a 400 HTTP status code. I've tried using the WordPress "user id" from the ActivityPub plugin author profile and I've tried the simple user name.Looks like 'password' grant is not supported by the WordPress enable-mastodon-apps plugin. Response text (should have looked at that earlier!):