Unknown grant type OAuth 2.0 Authorization Code Flow
I'm trying to authorise my app using OAuth 2.0 i Cache. Sadly I'm unable to exchange the authorization code for an access token.
I am able to redirect user to the /authorize page, where the user can login and approve my app. The user is then correctly redirected back to my app and a ?code parameter is sent back.
However when I try to make a POST request to the /token endpoint to exchange the authorization code for an access token I get the following error (from https://localhost:10443/oauth2/token which responds HTTP CODE 400 Bad Request):
"error_description": "Unknown grant_type"
My payload (of the request) looks like:
&client_id=[my client id is inserted here]
&client_secret=[my client secret is inserted here]
My request looks like this:
Can someone please help me track down what I'm doing wrong?