batchResetDevicesForUser method
Resets multiple devices for a specific user in a Wickr network. This operation forces the selected devices to log out and requires users to re-authenticate, which is useful for security purposes or when devices need to be revoked.
May throw BadRequestError.
May throw ForbiddenError.
May throw InternalServerError.
May throw RateLimitError.
May throw ResourceNotFoundError.
May throw UnauthorizedError.
May throw ValidationError.
Parameter appIds :
A list of application IDs identifying the specific devices to be reset for
the user. Maximum 50 devices per batch request.
Parameter networkId :
The ID of the Wickr network containing the user whose devices will be
reset.
Parameter userId :
The ID of the user whose devices will be reset.
Parameter clientToken :
A unique identifier for this request to ensure idempotency.
Implementation
Future<BatchResetDevicesForUserResponse> batchResetDevicesForUser({
required List<String> appIds,
required String networkId,
required String userId,
String? clientToken,
}) async {
final headers = <String, String>{
if (clientToken != null) 'X-Client-Token': clientToken.toString(),
};
final $payload = <String, dynamic>{
'appIds': appIds,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/networks/${Uri.encodeComponent(networkId)}/users/${Uri.encodeComponent(userId)}/devices',
headers: headers,
exceptionFnMap: _exceptionFns,
);
return BatchResetDevicesForUserResponse.fromJson(response);
}