Get Authentication Emails

Retrieve a paginated list of authentication-related emails stored by Smart Search.

chevron-rightInitializationhashtag

Environment Setup

Make sure your environment variables are configured correctly in the .env file:

Update your environment configuration file as shown below:

SMARTSEARCH_BASE_URL=<your-api-url>
SMARTSEARCH_TOKEN=<your-auth-token>

Initialize the Auth Email Client

from smartsearch.authentication_email.client import SmartSearchAuthEmailClient

client = SmartSearchAuthEmailClient(
    base_url=os.getenv("SMARTSEARCH_BASE_URL"),
    cache_manager=cache_manager
)

Authenticate with Token

await client.authenticate(token=os.getenv("SMARTSEARCH_TOKEN"))

Must be called once before making any search requests.


Usage

Retrieve authentication emails with pagination options such as page and items_per_page.

Parameters:

Key
Type
Description

page

int

The page number of results to retrieve

items_per_page

int

The number of records per page

Returns:

A list of authentication email records for the specified page.


Full Code Snippet

Last updated