Calling Token endpoint in Postman

I’m trying to call the Token endpoint via Postman with the following:

https://myoktapreview.com/oauth2/default/v1/token?grant_type=client_credentials&client_id=xxxxxxxxxxx&client_secret=yyyyyyyy&scope=okta.users.read

I get the following 400 Bad Request error:
“Bad request. Accept and/or Content-Type headers likely do not match supported values.”,

Is there something specific I need to set up in the Headers in Postman?

Thanks!

It looks like you’re trying to get an access token to use against the Okta APIs. I recommend walking through this guide: Overview | Okta Developer, as I believe you are missing a couple of necessary steps to get this working.

To more specifically answer your question, you will need to include the following headers:

'Accept: application/json' 
'Content-Type: application/x-www-form-urlencoded'
1 Like

Thank you very much Andrea, getting further now!

Now I get this error:
"The client is not authorized to use the provided grant type. Configured grant types: [implicit, refresh_token, authorization_code]

I am using grant_type=client_credentials - is there somewhere in Okta admin that I need to configure this for my client?

Thanks!

you can disregard, I found where to configure client credentials. Continuing testing now…