batchReinviteUser method

Future<BatchReinviteUserResponse> batchReinviteUser({
  1. required String networkId,
  2. required List<String> userIds,
  3. String? clientToken,
})

Resends invitation codes to multiple users who have pending invitations in a Wickr network. This operation is useful when users haven't accepted their initial invitations or when invitations have expired.

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 where users will be reinvited.

Parameter userIds : A list of user IDs identifying the users to be reinvited to the network. Maximum 50 users per batch request.

Parameter clientToken : A unique identifier for this request to ensure idempotency.

Implementation

Future<BatchReinviteUserResponse> batchReinviteUser({
  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: 'PATCH',
    requestUri: '/networks/${Uri.encodeComponent(networkId)}/users/re-invite',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
  return BatchReinviteUserResponse.fromJson(response);
}