OAuth2 Error 405 When Validating Receipt

Hi there.

I’m currently developping a Unity3D plugin to connect my players with their Patreon account and unlock part of the game based on their pledges.
In the Oauth process, I’m able to retrieve the first code with the following GET Request

www.patreon.com/oauth2/authorize?response_type=code&client_id=<MyClientID>&redirect_uri=<MyRedirectUri>`

But once I try to use it to receive the access tokens and refresh tokens, I use a POST Request with Content-Type:application/x-www-form-urlencoded :

'http://www.patreon.com/api/oauth2/token?code=<CodeFromPreviousStep>&grant_type=authorization_code&client_id=<MyClientID>&client_secret=<MyClientSecret>&redirect_uri=<MyRedirectUri>

I get the following error:
{
“errors”: [
{
“challenge_metadata”: null,
“code”: 1,
“code_name”: “MethodNotAllowed”,
“detail”: “The method is not allowed for the requested URL.”,
“id”: “3fadaf9e-96d2-56e8-ad37-687555c50e6b”,
“status”: “405”,
“title”: “Method Not Allowed”
}
]
}

I tested this on Postman, or with a python webapp, with no success. Am I missing something ? Does the POST request need to have a body or something ?

Thanks for your help.

If your clients are sending the parameters in the url, this may be causing the issue. It should be a post request with the parameters in post body.

https://docs.patreon.com/#step-4-validating-receipt-of-the-oauth-token