Get an API Access Token through REST Calls

Copper Contributor

For a week now I have not been able to figure out how to grab a bearer access token through REST API calls. I found the following guide:

http://www.vibhutisinha.com/2014/09/step-by-step-to-create-authorization.html

 

Unfortunately, after following the steps, I was receiving an authorization error from the API call to get the access token. 

 

Does anybody know of a way for me to gain access to a bearer access token via REST API calls?

2 Replies

Do your permissions require Tenant Admin Approval? (What permissions are you trying to grant)

They should not require Tenant Admin Approval. I am simply trying to send a request to the following URL: https://accounts.accesscontrol.windows.net/tokens/OAuth/2 and receive the bearer access token. According to the guide that I mentioned above, I should be good to get the token after I hit the "Trust It" button for the app.