If this is confusing, you’re probably missing context. Check out Managing Website Credentials in the Getting Started section for more information.

create_login_session

def create_login_session(
    self,
    url: str
) -> Tuple[bool, str]:
url
string
required

The URL of the website you want to create a login session for.

return
Tuple[bool, str]

A tuple containing:

  • succeeded (bool): Whether the login session was created successfully
  • login_session_url (str): URL to access the login session page where you can enter your credentials

Sample Usage

In this example, we’ll create a login session for a website that requires authentication.

from simplex import Simplex

simplex = Simplex(api_key="your_api_key")
login_session_url = simplex.create_login_session("https://login.retool.com")
print(login_session_url)
# Output: https://simplex.sh/login_session?sess=xxxxxxx&url=xxxxxxx

restore_login_session

def restore_login_session(
    self,
    session_data_filepath: str
) -> Tuple[bool, str]:
session_data_filepath
string
required

The path to the login session JSON file you want to restore.

return
bool

Whether the login session was restored successfully.

Sample Usage

In this example, we’re restoring a login session for a website that requires authentication.

from simplex import Simplex

simplex = Simplex(api_key="your_api_key")
simplex.create_session()
simplex.goto("https://retool.com")
simplex.restore_login_session("sessions/retool_login_session.json")