Skip to main content
Python
from simplex import SimplexClient

client = SimplexClient(api_key='your_api_key')

result = client.add_2fa_config(
    seed='JBSWY3DPEHPK3PXP',
    name='GitHub',
    partial_url='github.com'
)

print(f"Total configs: {result['total_configs']}")
{
  "succeeded": true,
  "added_config": {
    "type": "<string>",
    "two_fa_seed": "<string>",
    "name": "<string>",
    "partial_url": "<string>"
  },
  "total_configs": 123,
  "all_configs": [
    {}
  ],
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://simplex.sh/docs/llms.txt

Use this file to discover all available pages before exploring further.

Programmatically creating 2FA configs is currently only supported for TOTP seeds. Contact us on Slack if you need programmatic support for email/SMS as well.

Use Cases

  • Automated Login: Configure 2FA seeds for services your workflows need to access automatically
  • Site-Specific Authentication: Match configurations to specific URLs for targeted authentication
  • Multi-Service Support: Store multiple 2FA configurations for different services

Configuration Details

Each 2FA configuration can include:
  • Seed: The TOTP secret/seed for generating 2FA codes (required)
  • Name: A friendly name to identify the configuration (optional)
  • Partial URL: URL pattern to automatically match and apply the configuration (optional)
Either name or partial_url must be provided along with the required seed.

Response

The API returns:
  • The added configuration details
  • Total number of configurations for your organization
  • Array of all existing configurations

Security Notes

  • 2FA seeds are stored securely and associated with your organization
  • Configurations are only accessible via authenticated API requests
  • Seeds are used to generate TOTP codes during automated browser sessions

Authorizations

X-API-Key
string
header
required

Simplex API Key

Body

application/json
seed
string
required

The 2FA seed/secret for generating TOTP codes.

name
string

Optional name for the 2FA configuration.

partial_url
string

Optional partial URL to match for automatic 2FA code entry.

Response

2FA configuration added successfully

succeeded
boolean
required

Whether the operation succeeded.

added_config
object

The 2FA configuration that was added.

total_configs
integer

Total number of 2FA configs for this organization.

all_configs
object[]

Array of all 2FA configurations.

error
string

Error message if the operation failed.