# How to provide a delete account functionality in an android app using auth0 apis?

**URL:** <https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [January 24, 2024, 4:50am UTC](https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531 "2024-01-24T04:50:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijayazararia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vijayazararia/32/53279_2.png) [@vijayazararia](https://community.auth0.com/u/vijayazararia)\
**Post date:** [January 24, 2024, 4:50am UTC](https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531/1 "2024-01-24T04:50:07Z")

</div>

Currently , I am implementing an android app and we have a requirement to provide delete functionality. As per Google ,all the app which has Sign up feature , should also provide delete account feature. How to implement it in my app? Because the access token which I am receiving now, doesn’t have delete:users scope. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![thameera](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thameera/32/13430_2.png) [@thameera](https://community.auth0.com/u/thameera)\
**Post date:** [January 24, 2024, 5:17am UTC](https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531/2 "2024-01-24T05:17:38Z")

</div>

Hi @vijayazararia , the user cannot get an Access Token with the `delete:users` scope during login. Your backend/API can do that though by following the guide here: [Get Management API Access Tokens for Production](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-access-tokens-for-production)

Our recommendation here is to:

1. When the user attempts to delete the profile, send a request to your backend/API with the user’s access token.
2. The backend should first validate the access token and get the user\_id (sub) from the token.
3. The backend generates a new Access Token for the Management API.
4. The backend deletes the user and sends a successful response back to the app.
5. The app, after getting the response, logs out the user.

I hope that helps.

---

<div class="post-metadata">

**Author:** ![vijayazararia](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vijayazararia/32/53279_2.png) [@vijayazararia](https://community.auth0.com/u/vijayazararia)\
**Post date:** [January 24, 2024, 7:45am UTC](https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531/3 "2024-01-24T07:45:29Z")

</div>

Thanks a lot @thameera , it really helped. Very well explained.

---

<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:** [February 7, 2024, 7:46am UTC](https://community.auth0.com/t/how-to-provide-a-delete-account-functionality-in-an-android-app-using-auth0-apis/125531/4 "2024-02-07T07:46:01Z")

</div>

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