Getting 404 for https://dev-695483-admin.okta.com/oauth2/default/v1/token

Hi all,

I am trying to get access token using the following post request mentioned in the documentation :
curl --request POST
–url https://${yourOktaDomain}/oauth2/default/v1/token
–header ‘accept: application/json’
–header ‘authorization: Basic MG9hY…’
–header ‘cache-control: no-cache’
–header ‘content-type: application/x-www-form-urlencoded’
–data ‘grant_type=client_credentials&scope=customScope’

Hitting request on my env:
curl --request POST
–url https://dev-695483-admin.okta.com/oauth2/default/v1/token
–header ‘accept: application/json’
–header ‘authorization: Basic MG9hMjlydWt3azEycG9JeGwzNTc6V1QtRlFFODI4RFIzdUMwOEtTQkdQMTU0SUVFWVlkT1BSelgtNFBhUA==’
–header ‘cache-control: no-cache’
–header ‘content-type: application/x-www-form-urlencoded’
–data ‘grant_type=client_credentials&scope=custom’

On terminal, neither I am getting error nor I am getting any response.
However, on postman I am getting 404 error.

Can you please help me resolving this?

Hi @gourav

Please remove the -admin from the subdomain of your Okta tenant and try the request again.

Thank you very much @dragos

Hi @dragos,

I am getting 401 error over postman after using the token received.

Cnn you please help me?

Gourav

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.