batch_lookup_user_uname
¶
batch_lookup_user_uname(
network_id: NetworkId,
unames: Unames,
*,
config_overrides: Optional[WickrClientConfig] = None,
client_token: Optional[ClientToken] = None,
) -> BatchLookupUserUnameResponse
Looks up multiple user usernames from their unique username hashes (unames). This operation allows you to retrieve the email addresses associated with a list of username hashes.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network where the users will be looked up.
-
unames(Unames) –A list of username hashes (unames) to look up. Each uname is a unique identifier for a user's username. Maximum 50 unames per batch request.
-
client_token(Optional[ClientToken], default:None) –A unique identifier for this request to ensure idempotency.
Raises:
-
BadRequestError–The request was invalid or malformed. This error occurs when the request parameters do not meet the API requirements, such as invalid field values, missing required parameters, or improperly formatted data.
-
ForbiddenError–Access to the requested resource is forbidden. This error occurs when the authenticated user does not have the necessary permissions to perform the requested operation, even though they are authenticated.
-
InternalServerError–An unexpected error occurred on the server while processing the request. This indicates a problem with the Wickr service itself rather than with the request. If this error persists, contact Amazon Web Services Support.
-
RateLimitError–The request was throttled because too many requests were sent in a short period of time. Wait a moment and retry the request. Consider implementing exponential backoff in your application.
-
ResourceNotFoundError–The requested resource could not be found. This error occurs when you try to access or modify a network, user, bot, security group, or other resource that doesn't exist or has been deleted.
-
UnauthorizedError–The request was not authenticated or the authentication credentials were invalid. This error occurs when the request lacks valid authentication credentials or the credentials have expired.
-
ValidationError–One or more fields in the request failed validation. This error provides detailed information about which fields were invalid and why, allowing you to correct the request and retry.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Lookup multiple user unames
>>> client.batch_lookup_user_uname(network_id='12345678', unames=['a1b2c3d4e5f6', 'g7h8i9j0k1l2'], client_token='f47ac10b-58cc-4372-a567-0e02b2c3d479')
Partial failure - uname not found