Ofer1
ServiceNow Employee
ServiceNow Employee

I was getting access denied when trying to get a Bearer token using OAuth Setup.

The missing piece for me was to set grant_type=client_credentials.

Here is a curl command:

curl -d "grant_type=client_credentials&client_id=[]&client_secret=[]&username=[]&password=[]" -X POST "https://[].service-now.com/oauth_token.do"

 

And postman screenshot:

oauth.png