Deleting a User
danger
Deleting any Busy Hour User will remove any access to the project/apps. Keep in mind that this action is irreversible and cannot be undone.
In this section, we will show you how to delete a Busy Hour User.
Prerequisites
- Busy Hour Account (Sign Up if you don't have one yet)
- Generate a Master/Project API Key from Dashboard/Settings or from Dashboard/Projects
Deleting a User
warning
You can delete a Busy Hour User with any Master API Key or a Project API Key that only specificly for the project user you want to delete.
To delete a Busy Hour User, you can use the user.delete
function from the @busy-hour/node
package. The function take a userId
to delete as the argument.
Quick Example
src/main.ts
import { BusyHourNode } from '@busy-hour/node';
// Create an instance of BusyHourNode with your API key (Master/Project)
const nodeSdk = new BusyHourNode({
apiToken: 'your-api-token',
});
nodeSdk.user.delete({
userId: 'your-user-id',
});