# Insufficient Scope for Requesting to Resend Email Verification

**URL:** <https://community.auth0.com/t/insufficient-scope-for-requesting-to-resend-email-verification/95057>\
**Category:** Get Help\
**Tags:** emails, management-api\
**Created:** [November 24, 2022, 3:01am UTC](https://community.auth0.com/t/insufficient-scope-for-requesting-to-resend-email-verification/95057 "2022-11-24T03:01:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![supergrounded](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/supergrounded/32/37589_2.png) [@supergrounded](https://community.auth0.com/u/supergrounded)\
**Post date:** [November 24, 2022, 3:01am UTC](https://community.auth0.com/t/insufficient-scope-for-requesting-to-resend-email-verification/95057/1 "2022-11-24T03:01:53Z")

</div>

I am trying to allow user to request a resend for email verification in Angular SPA. However, when I call the POST /verification-email API it’s giving me insufficient\_scope error, expecting update:users scope.

I tried to add the scope in the AuthConfig `scope: 'update:users read:current_user'`, but it’s still not working. Can someone please help?

```auto
@Injectable()
export class ManagementService {
    constructor(private http: HttpClient) {

    }
    resendVerificationEmail(request: any) {
        const url = '/auth/jobs/verification-email'; //proxy to auth0 domain api
        return this.http.post(url, request, { reportProgress: true, responseType: 'json' });
    }
}

```

```auto
export class ProfileComponent {
    userInfo: any;
    constructor(private auth: AuthService, private managementService: ManagementService) {

    }
    ngOnInit() {
        this.auth.getUser().pipe(
            switchMap((user)=> this.managementService.getUserData(user?.sub)),
            map((userInfo)=> {
                this.userInfo = userInfo;
            })
        ).subscribe();
    }
    // call when user clicks on button to request email verification
    verifyEmail() {
        this.managementService.resendVerificationEmail({user_id: this.userInfo.user_id}).subscribe({
            next: (result) => {
                console.log(result);
            }
        })
    }
}

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [November 29, 2022, 10:44pm UTC](https://community.auth0.com/t/insufficient-scope-for-requesting-to-resend-email-verification/95057/3 "2022-11-29T22:44:10Z")

</div>

Hey there @supergrounded!

> [@supergrounded](#):
>
> However, when I call the POST /verification-email API it’s giving me insufficient\_scope error, expecting update:users scope.

Are you just using the user’s access token in this scenario? If so, you won’t be able to add the `update:users` scope as even Management API tokens issued to a SPA are [limited in scope](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-tokens-for-single-page-applications#available-scopes-and-endpoints).

Instead, you will need to make this call from a backend which handles getting a Management API access token, similar to what’s described in this FAQ:

[https://community.auth0.com/t/how-can-i-enable-users-to-change-their-email-address-from-a-spa-or-native-app/44064](https://community.auth0.com/t/how-can-i-enable-users-to-change-their-email-address-from-a-spa-or-native-app/44064)

---

<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:** [December 13, 2022, 10:44pm UTC](https://community.auth0.com/t/insufficient-scope-for-requesting-to-resend-email-verification/95057/4 "2022-12-13T22:44:14Z")

</div>

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