Multi-Factor Authentication (MFA) Login
Multi-Factor Authentication (MFA) provides an additional layer of security for your Circularo account by requiring a second verification step after entering your password. This scenario demonstrates how to authenticate when MFA is enabled on your account. Key benefits:- Enhanced security through multi-factor verification
- Protection against unauthorized access even if your password is compromised
- Support for multiple authentication factors including email, SMS, and authenticator apps
Prerequisites
This scenario assumes the user has active MFA on their account. Users can activate MFA either themselves using the Preferences -> Security settings, or it can be enforced by an administrator.When MFA is enabled, you’ll need to complete both authentication steps before you can access protected resources.
Step 1 - Login with MFA-enabled account
Authenticate with your username and password to obtain a session token. Since your account has MFA enabled, the token will be returned in a locked state.- This initial authentication verifies your first factor (something you know - your password)
- The returned token will be locked and requires additional verification
- You’ll need to complete the MFA challenge before you can use the token
- token - Located at
tokenin the response.- The authentication token that should be included in subsequent API requests. This token identifies your session and provides access to authorized resources.
- Example value:
ipVYLSUoW0SY5r6qPrBEDnwDIMpMgt2VCyV0khjOIp4dib8dYwblsqA2lHNyu3gR
Step 2 - Unlock the session token
In the previous step, MFA was invoked and dispatched. Assuming the “email” was configured as the MFA factor in the user account, an email containing the verification code was sent. Utilize the received code in this call to unlock your session token.Other MFA provider options include “sms” for text message verification and “totp” for time-based one-time passwords from authenticator apps.
Step 3 - Test the session token by retrieving available documents (Optional)
This endpoint demonstrates how to use your unlocked session token to perform an actual operation - in this case, searching for available documents in the system.- The session token is passed in the query parameters
- The search operation returns documents the authenticated user has access to
- This pattern applies to all token protected API endpoints - include your session token in each request
This is a practical example of how to use your session token for API operations. Do not call this endpoint if you don’t wish to perform a search operation.
Step 4 - Terminate the session (Optional)
Invalidates the current session token, effectively logging the user out of the system. This is an important security practice to prevent unauthorized access after a session is no longer needed.- Invalidates the token provided in the request
- Prevents the token from being used for any future API requests
- Should be called when a session is no longer needed
- Does not affect other active sessions for the same user
This endpoint only invalidates the specific token provided in the request. Other active sessions for the same user will remain valid.
MFA Login Summary
Multi-Factor Authentication provides enhanced security for your Circularo account:- Initial authentication requires your username and password
- A second factor verification is required to unlock the session token
- Once unlocked, the session token functions identically to a regular session token
- Session tokens remain valid for 30 days by default after being unlocked
Example MFA Login Flow
See our OpenAPI documentation to learn about the full set of API endpoints and parameters.
Please use proper exception handling and function decomposition in your own code. The code is provided for illustrative purposes only and is not intended for production use.