Postman oAuth2 error Unauthorized grant type
<p>I have an application that use oAuth2, and I try to request an access token from terminal with this command </p>

<pre><code>curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=spring&amp;username=roy&amp;grant_type=password&amp;scope=read%20write&amp;client_secret=123456&amp;client_id=clientapp"
</code></pre>

<p>it works fine and I get a response like this</p>

<pre><code>{"access_token":"29c4c218-1d9a-4d2d-abe3-197bc2969679","token_type":"bearer","refresh_token":"6b7ffda7-4652-4197-b8e9-c80635eb9143","expires_in":38630,"scope":"read write"}
</code></pre>

<p>but the problem is when I try to request an access token via postman is always get this error:</p>

<pre><code>Handling error: InvalidClientException, Unauthorized grant type: client_credentials
</code></pre>

<p>how do get access token via postman like I get token via curl command?</p>