Skip to main content
1 of 6
Brock Adams
  • 13k
  • 5
  • 39
  • 64

The question is not completely clear. You may need to post an MCVE.

Your app code (and the API) appears to be working properly, you are getting an access_token in the body.

And yes, the body is text/plain (transmitted via SSL). That is how it should be.

The purpose of x-www-form-urlencoded is to package data in an unambiguous way that removes conflicts with the HTTP protocols (reserved characters, etc.). It is separate but: related to, more compact than, more strict than, and more specialized than HTML -- which is what the server uses to send back the response.

Since a server's response to a form POST is expected to be valid HTML, there is no need for form or URL encoding.
You can think of x-www-form-urlencoded as a kind of "micro format".

Brock Adams
  • 13k
  • 5
  • 39
  • 64