I try to fetch an access token in the OAuth2 authorization code flow.
After receving code
from oauth2/authorize
I make the following post request:
https://www.mediawiki.org/w/rest.php/oauth2/access_token?grant_type=authorization_code&redirect_uri=https%3A%2F%2Ftools.wmflabs.org%2Fplnode%2F&client_id=0b...&client_secret=3...&code=d...
But as answer I receive: { "error": "invalid_request", "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.", "hint": "Check the `grant_type` parameter", "message": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed."}
Has anybody an idea what I'm doing wrong or can even provide some working example for oauth2?