# Auth0 Management API Authorization Error

**URL:** <https://community.auth0.com/t/auth0-management-api-authorization-error/81305>\
**Category:** Get Help\
**Tags:** api, management-api, auth0\
**Created:** [April 7, 2022, 1:00am UTC](https://community.auth0.com/t/auth0-management-api-authorization-error/81305 "2022-04-07T01:00:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fleetcode](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/fleetcode/32/36444_2.png) [@fleetcode](https://community.auth0.com/u/fleetcode)\
**Post date:** [April 7, 2022, 1:00am UTC](https://community.auth0.com/t/auth0-management-api-authorization-error/81305/1 "2022-04-07T01:00:42Z")

</div>

Hi,

I’m a college computer science student who is currently using Auth0 as a means for user authentication, so apologies for any misunderstandings (I am very inexperienced) on my behalf.

I would like to use the Auth0 Management API to update metadata for my teams’ users. I’m trying to obtain authorized access from the Management API, and am running into errors with sending a generated access token to the API - I keep getting an [unauthorized] response from the API upon sending the request. I’m generating the access token fine and it appears to be in jwt format. My code closely resembles the provided C# code in the tutorial with test connections.

```auto
public async Task<string> receiveAuth0Token() {
       
      var client = new RestClient("https://tigertix.us.auth0.com/oauth/token");
      var request = new RestRequest();
      request.Method = Method.Post;
      request.AddHeader("content-type", "application/json");
      request.AddJsonBody(new {
          client_id = "XXXXXXXXXXXXXXX",
          client_secret = "XXXXXXXXXXXXXXXXXX",
          audience = "https://tigertix.us.auth0.com/api/v2/",
          grant_type = "client_credentials"

        });

        var response = await client.ExecuteAsync(request);
        
        var test = response.Content.FromJson<object>();
        Dictionary<string, object> response1 = ((Dictionary<string, object>)(test));

        string token = (string)response1["access_token"];

        return token;

        
    }

```

```auto
public async void sendAuth0Token(string token) {
        
        var client = new RestClient("https://tigertix.us.auth0.com/api/");
        var request = new RestRequest();
        request.Method = Method.Get;
    
        request.AddHeader("authorization", "Bearer " + token);
        var response = await client.ExecuteAsync(request);
        
    }

```

Any help would be much appreciated, thanks in advance!

EDIT: I believe the first snippet of code works fine, as the token is generated successfully in jwt format.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [April 7, 2022, 5:59pm UTC](https://community.auth0.com/t/auth0-management-api-authorization-error/81305/3 "2022-04-07T17:59:31Z")

</div>

Hi @fleetcode,

Welcome to the Auth0 Community!

In the second request, where are you trying to send the request? It looks like you are currently sending it to `https://tigertix.us.auth0.com/api/` when you would usually send it to a specific endpoint of the **v2** API.

For example, to search users you would use: `https://tigertix.us.auth0.com/api/v2/users`

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [May 25, 2022, 9:26pm UTC](https://community.auth0.com/t/auth0-management-api-authorization-error/81305/4 "2022-05-25T21:26:48Z")

</div>


