Two-Factor Authentication ​
It is possible to require Two-Factor Authentication (2FA), in the form of One-Time Passwords, as part of the authentication process when making calls to Passwordstate's API(s).
For the Standard API, the Secret Key/QR Code can be created on the screen Administration -> System Settings -> API tab.
If this 2FA secret has been created on the screen above, then it is mandatory to pass the One-Time Password 6 digit code to each of your calls to the API, and these are passed on the header request - see example below.
Powershell
# Powershell Request (GET - Retrieving Data)
$PasswordstateUrl = 'https://passwordstate/api/passwordlists/<PasswordListID>'
Invoke-Restmethod -Method Get -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>"; "OTP" = "<6 Digit Code>" }