cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2599
Views
4
Helpful
2
Replies

404 Error Retrieving Token

rob.macbride
Community Member

I've registered a new application and am setting up the auth.  The documentation says to retrieve the token from "https://cloudsso.cisco.com/as/token.oauth2".  The example given in the documentation is below:

curl -s -k -H "Content-Type: application/x-www-form-urlencoded" -X POST -d "client_id=<OAuth-Client-ID>" -d "client_secret=<OAuth-Client-Secret>" -d "grant_type=client_credentials" https://cloudsso.cisco.com/as/token.oauth2

When attempting this with curl (using our own client ID and client secret) to the above URL, we get a 404 page not found error.  Is this caused by an error in the token retrieval, or is the page actually missing?  Is there a different/new URL we should use?

Thank you!

2 Replies 2

bkorabik
Community Member

Robert, your url that you are using is correct. Have you tried to retrieve the token using postman? Postman can auto generate a curl request based on getting the access token.

Inside postman you can do a post request with the following url and input your client id and secret.

https://cloudsso.cisco.com/as/token.oauth2?grant_type=client_credentials&client_id=yourclientid&client_secret=yourclientsecret

You can also do a get request inside of postman using a url of an advisory and use Oauth 2 as the authentication as well.

Thanks,

Bradley Korabik

rob.macbride
Community Member

Looks like the issue was caused by having the app set to "authorization code", instead of "client credentials".  It's not the error I would have expected but changing to client credentials corrected the issue.