Get device passwords¶
Fetch all device passwords for authentication user’s (MailUser) account
- HTTP Method:
GET - URL:
https://example.domain.tld/api/v1/2fa/device_password/ - Require authentication:
Yes - Permission level required:
MailUser
Response parameters¶
| Parameter | Type | Description |
|---|---|---|
| 2fa | dict | The 2FA object |
| device_password | list | List of device password names (identifiers) |
Example request (Python)¶
import requests
import json
from pprint import pprint
url = "https://example.domain.tld/api/v1/2fa/device_password/"
r = requests.get(url, auth=("u2@vonmail.com","long-auth_token-here"))
try:
pprint(r.json())
except:
print(r.text)
Example response (JSON)¶
{'2fa': {'device_password': ['Workstation']}}