Account Delete

Describe about user account deletion and a verification API which verifies account is deleted or not.

Account Delete and Verification

The Account Delete and Verification allows users to initiate the account deletion process, through a website link which includes username, phone number, country which are autofilled and a reason for deletion which should be selected by users from dropdown and an API to check account deletion status. It's an essential feature for users who wish to permanently delete their accounts from the e-commerce platform.

Delete option in Profile

When a user requests to delete their account, you can generate a unique URL that includes a bearer token as a query parameter. The bearer token should be used for authentication to verify the user's identity.

Example Account Deletion Link:

User Account Verification Page

When the user opens the account deletion link, they should be directed to a verification page. This page can display the following information, Name, phone number and country will be autofilled based on the user's account details user need to select reason for deletion from the dropdown box:

Account Deletion page
  • Username

  • Phone Number

  • Country

  • Reason for Deletion (Options)

    • I am not using this account anymore

    • I have another account

    • Account security concerns/Unauthorized activity

    • Privacy concerns

    • I do not want to provide a reason

API for Account Verification

This API endpoint accepts a bearer token as authentication also user's bearer token should be included in the request header. This API should verify if the user's account has been deleted successfully or not based on the provided bearer token. It can return a success message if the account has been deleted, or an error message if not.

Endpoint

  • {{baseurl}}/api/v1/customer/account-delete

Method

  • POST

Authorization

The API requires a valid bearer token in the request header for authentication. Users must include their token in the "Authorization" header to access their account.

Request Body

The request body should include bearer token of user.

Response Format

The API responds with a JSON object indicating the status of the user account.

By following these steps, you can allow users to request account deletion using a unique link with a bearer token for authentication. The API can then verify if the account deletion was successful. Remember to implement security measures to protect the bearer tokens and ensure that only authorized users can access the deletion and verification processes.

Last updated