Delete a User
In this code snippet you learn how to delete a User.
Example
Ensure the following variables are set to your required values using any convenient method:
| Key | Description |
|---|---|
USER_ID | The unique ID of the User. |
Prerequisites
You will need to use an existing Application and have a User in order to be able to delete a User. See the Create Conversation code snippet for information on how to create an Application. See also the Create User code snippet on how to create a User.
Run your code
Save this file to your machine and run it:
Prerequisites
You will need to use an existing Application and have a User in order to be able to delete a User. See the Create Conversation code snippet for information on how to create an Application. See also the Create User code snippet on how to create a User.
Create a file named delete-user.js and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
You will need to use an existing Application and have a User in order to be able to delete a User. See the Create Conversation code snippet for information on how to create an Application. See also the Create User code snippet on how to create a User.
Add the following to build.gradle:
Create a file named DeleteUser and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.users with the package containing DeleteUser:
Prerequisites
You will need to use an existing Application and have a User in order to be able to delete a User. See the Create Conversation code snippet for information on how to create an Application. See also the Create User code snippet on how to create a User.
Add the following to build.gradle:
Create a file named DeleteUser and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.users with the package containing DeleteUser:
Prerequisites
You will need to use an existing Application and have a User in order to be able to delete a User. See the Create Conversation code snippet for information on how to create an Application. See also the Create User code snippet on how to create a User.
Run your code
Save this file to your machine and run it:
Try it out
When you run the code you will delete the specified User.