batchDeleteUser method
Deletes multiple users from a specified Wickr network. This operation permanently removes user accounts and their associated data from the network.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter networkId :
The ID of the Wickr network from which users will be deleted.
Parameter userIds :
A list of user IDs identifying the users to be deleted from the network.
Maximum 50 users per batch request.
Parameter clientToken :
A unique identifier for this request to ensure idempotency. If you retry a
request with the same client token, the service will return the same
response without attempting to delete users again.
Implementation
Future<BatchDeleteUserResponse> batchDeleteUser({
required String networkId,
required List<String> userIds,
String? clientToken,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'userIds': userIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/networks/${Uri.encodeComponent(networkId)}/users/batch-delete',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return BatchDeleteUserResponse.fromJson(response);
}