Get 2FA status

Retrieve information on authenticated account’s two-factor authentication (2FA).

  • HTTP Method: GET
  • URL: https://example.domain.tld/api/v1/2fa/<username>/
  • Require authentication: Yes
  • Permission level required: MasterAdmin / DomainAdmin / MailUser

Path parameters

Parameter Type Description Required
username str Account username Required

Response parameters

Parameter Type Description
2fa dict The 2FA object
status str 2FA status
username str Your account username

Example request (Python)

import requests
import json
from pprint import pprint

url = "https://example.domain.tld/api/v1/2fa/u2@vonmail.com/"
r = requests.get(url, auth=("u2@vonmail.com","long-auth_token-here"))
try:
    pprint(r.json())
except:
    print(r.text)

Example response (JSON)

{'2fa': {'status': 'enabled', 'username': 'u2@vonmail.com'}}