Get access history

The GET /api/users/logins API endpoint retrieves the login history of the currently authenticated user. It provides information on recent login attempts, such as timestamps and IP addresses, helping users track access to their accounts.

Functionality:

  • Returns the login history for the authenticated user, including timestamps, IP addresses, and potentially the device used for each login attempt.
  • Requires a valid bearer token for authentication.

Key Features:

  • Login History Retrieval: Returns details of recent login attempts, including when and where they occurred.
  • Security Monitoring: Useful for users to track unauthorized access or monitor login activities.
  • Secure Access: Requires a valid authentication token, ensuring only authorized users can view their login history.
  • Error Handling: Provides specific error messages for issues like unauthorized access or no records found.

This API is useful for security-conscious users who want to monitor their login activity and ensure the integrity of their account access.

Language
Credentials
Bearer
JWT
Click Try It! to start a request and see the response here!