get_user
async
¶
get_user(
network_id: NetworkId,
user_id: UserId,
*,
config_overrides: Optional[AsyncWickrClientConfig] = None,
start_time: Optional[datetime] = None,
end_time: Optional[datetime] = None,
) -> GetUserResponse
Retrieves detailed information about a specific user in a Wickr network, including their profile, status, and activity history.
Parameters:
-
network_id(NetworkId) –The ID of the Wickr network containing the user.
-
user_id(UserId) –The unique identifier of the user to retrieve.
-
start_time(Optional[datetime], default:None) –The start time for filtering the user's last activity. Only activity after this timestamp will be considered. Time is specified in epoch seconds.
-
end_time(Optional[datetime], default:None) –The end time for filtering the user's last activity. Only activity before this timestamp will be considered. Time is specified in epoch seconds.
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:
Get user information
>>> await client.get_user(network_id='12345678', user_id='12345')
Get user info with activity time range
>>> await client.get_user(network_id='12345678', user_id='12345', start_time=1704067200, end_time=1705500000)
User not found error
Source code in docs_src/capo_wickr/_services/async_wickr.py
1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 | |