how to pass client credentials in postman? how to pass client credentials in postman? curl curl

how to pass client credentials in postman?


cURL

acme:acmesecret@localhost:9999/uaa/oauth/token

The acme:acmesecret is the HTTP client credentials sent in the basic auth header. You can add the -v switch to see the headers in the request.

-d "password=password&username=user&grant_type=password"

This is the form data.

In the Postman request, you have it switched around. You have the client credentials in the form data, and I'm guessing you have the user credentials in the auth header.

Just switch them. For an OAuth 2.0 password grant request, the client credentials should go in the auth header, while the user credentials go in the form data.


I found this piece of information to be quite helpful from the Postman docs incase others needed more clarification.

Postman > Sending API Requests > Authorization

https://learning.getpostman.com/docs/postman/sending_api_requests/authorization/