# Simple API Test Access using Auth0 Sample code, Auth0 Authentication API Debugger, and Postman

**URL:** <https://community.auth0.com/t/simple-api-test-access-using-auth0-sample-code-auth0-authentication-api-debugger-and-postman/6903>\
**Category:** Get Help\
**Tags:** test, api-authorization, sample, api, authentication\
**Created:** [June 4, 2017, 10:20pm UTC](https://community.auth0.com/t/simple-api-test-access-using-auth0-sample-code-auth0-authentication-api-debugger-and-postman/6903 "2017-06-04T22:20:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike4](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mike4/32/7203_2.png) [@mike4](https://community.auth0.com/u/mike4)\
**Post date:** [June 4, 2017, 10:20pm UTC](https://community.auth0.com/t/simple-api-test-access-using-auth0-sample-code-auth0-authentication-api-debugger-and-postman/6903/1 "2017-06-04T22:20:41Z")

</div>

I am using [ASP.NET Web API (OWIN) Authorization](https://auth0.com/docs/quickstart/backend/webapi-owin/01-authorization) as my API test harness. I have created a default Auth0 API.

![alt text](https://sea1.discourse-cdn.com/auth0/storage/temp/227-untitled1.png)

I added to the Web API the proper web.config settings for the Auth0 API

```
  <appSettings>
    <add key="Auth0Domain" value="mikemichaelis.auth0.com" />
    <add key="Auth0ApiIdentifier" value="test-api.azurewebsites.com" />
  </appSettings>

```

The API test client was created automatically. I added to the test client configuration the callback necessary to use the Auth0 Authentication API Debugger Extension.

![alt text](https://sea1.discourse-cdn.com/auth0/storage/temp/230-untitled2.png)

Using the API Debugger Extension I have selected the proper test client and initiated the OAUTH2 CLIENT CREDENTIALS flow to obtain an access\_token  
 ![alt text](https://sea1.discourse-cdn.com/auth0/storage/temp/231-untitled3.png)

Within Postman I have tested calling the unsecured Ping API endpoint successfully. Calling the secured endpoint fails as expected. I have added the access\_token as an Authorization Bearer token, but the secured Ping call still fails.

![alt text](https://sea1.discourse-cdn.com/auth0/storage/temp/233-untitled4.png)

Thank you for any help in fixing my problem!

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [June 6, 2017, 6:20am UTC](https://community.auth0.com/t/simple-api-test-access-using-auth0-sample-code-auth0-authentication-api-debugger-and-postman/6903/2 "2017-06-06T06:20:37Z")

</div>

There are several things worth checking:

- You have configured a Non Interactive Client at the Dashboard, for your application.
- You have authorized the Non Interactive Client to access your API.
- The `audience` parameter is passed to the `/oauth/token` endpoint when obtaining the access\_token.

I’d suggest looking through the following Troubleshooting document:

> **[Auth0 ASP.NET Web API (OWIN) SDK Quickstarts: Troubleshooting](https://auth0.com/docs/quickstart/backend/webapi-owin/03-troubleshooting)**
>
> This document will help you troubleshoot your configuration if you get a 401 (Unauthorized) response from your API.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/simple-api-test-access-using-auth0-sample-code-auth0-authentication-api-debugger-and-postman/6903/3 "2018-03-02T05:54:22Z")

</div>


