# 401 "Bad audience" error when resending email verification

**URL:** <https://community.auth0.com/t/401-bad-audience-error-when-resending-email-verification/131434>\
**Category:** Get Help\
**Tags:** jobs, management-api\
**Created:** [April 7, 2024, 3:35pm UTC](https://community.auth0.com/t/401-bad-audience-error-when-resending-email-verification/131434 "2024-04-07T15:35:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bdfin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bdfin/32/50274_2.png) [@bdfin](https://community.auth0.com/u/bdfin)\
**Post date:** [April 7, 2024, 3:35pm UTC](https://community.auth0.com/t/401-bad-audience-error-when-resending-email-verification/131434/1 "2024-04-07T15:35:47Z")

</div>

Hi,

I have a .NET 8 Blazor WASM app and .NET API which I have successfully enabled Auth0 for, however I am trying to implement an endpoint to resend verification email but I’m receiving the following error when calling `https://login.auth0.com/api/v2/jobs/verification-email`:

```auto
{
  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Bad audience: https://{myName}.uk.auth0.com/api/v2/"
}

```

I have created a M2M app that has access to the management API and has the correct scope to be able to call this endpoint. I am able to successfully retrieve an access token using the following params:

```auto
var requestContent = new FormUrlEncodedContent(new Dictionary<string, string>
{
    { "Content-Type", "application/x-www-form-urlencoded" },
    { "grant_type", "client_credentials" },
    { "client_id", settings.ClientId },
    { "client_secret", settings.ClientSecret },
    { "audience", "https://{myName}.uk.auth0.com/api/v2/" }
});

 var response = await httpClient.PostAsync(TokenEndpoint, requestContent, cancellationToken);

```

Any help with this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![bdfin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bdfin/32/50274_2.png) [@bdfin](https://community.auth0.com/u/bdfin)\
**Post date:** [April 7, 2024, 3:51pm UTC](https://community.auth0.com/t/401-bad-audience-error-when-resending-email-verification/131434/2 "2024-04-07T15:51:07Z")

</div>

> [@bdfin](#):
>
> [https://login.auth0.com/api/v2/jobs/verification-email](https://login.auth0.com/api/v2/jobs/verification-email)

For anyone else who comes across this…

After days of debugging it turns out the documentation is simply out of date and

`https://login.auth0.com/api/v2/jobs/verification-email`

should actually be

`https://{myName}.{countryCode}.auth0.com/api/v2/jobs/verification-email`.

🤦‍♂️

---

<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:** [April 21, 2024, 3:52pm UTC](https://community.auth0.com/t/401-bad-audience-error-when-resending-email-verification/131434/3 "2024-04-21T15:52:06Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
