WebOTPLimited availability
The OTPCredential API represents a one-time-password (OTP).
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–92Not supported
93+Supportedsince Aug 31, 2021
Current: 155Edge
12–92Not supported
93+Supportedsince Sep 2, 2021
Current: 154Firefox
✕Not supportedup to 157
Current: 157Safari
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27MobileChrome Android
18–83Not supported
84+Supportedsince Jul 27, 2020
Current: 155Firefox Android
✕Not supportedup to 157
Current: 157Safari iOS
1–26.6Not supported
27+Supportedsince Sep 14, 2026
Current: 27How to use
Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: OTPCredential.
Feature detection
JS · check before using
if ("OTPCredential" in globalThis) {
// OTPCredential is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| CredentialsContainer.get.otp_option | 93 | 93 | ✕ | 27 | 84 | ✕ | 27 |
| OTPCredential | 93 | 93 | ✕ | ✕ | 84 | ✕ | ✕ |
| OTPCredential.code | 93 | 93 | ✕ | ✕ | 84 | ✕ | ✕ |
| iframe.allow.otp-credentials | 93 | 93 | ✕ | ✕ | 84 | ✕ | ✕ |
| http.headers.Permissions-Policy.otp-credentials | 93 | 93 | ✕ | ✕ | 88 | ✕ | ✕ |