Use cookie authentication with a REST nonce for requests from a logged-in user in a same-origin WordPress plugin or theme. For a remote script, app, or integration, use a dedicated Application Password over HTTPS. In either case, authentication identifies the user; WordPress permissions still determine what the user can do.
How do I authenticate WordPress REST API requests?
Choose the method by where the request originates. WordPress documents two built-in approaches: cookie authentication for a logged-in browser context, and Application Passwords for programmatic access from a remote client.
| Request origin | Use | Key condition |
|---|---|---|
| Logged-in user in a same-origin plugin or theme | WordPress cookie authentication with a nonce for the wp_rest action |
Send the nonce as X-WP-Nonce for custom requests; the user must have the capability the operation requires. |
| Remote script, app, or external integration | A dedicated Application Password using HTTP Basic authentication | Send credentials over HTTPS and store the password securely. |
| Special external authentication design | A reviewed plugin that adds an approach such as OAuth 1.0a Server or JWT | Check the plugin’s current maintenance, implementation, and compatibility; WordPress documentation does not establish that any particular plugin is secure or current. |
WordPress’s REST API authentication guide, last updated June 4, 2025, describes cookie authentication for logged-in requests. Its Application Passwords guide, last updated January 28, 2026, describes the programmatic credential option. REST API authentication · Application Passwords
How do I send a REST nonce for cookie authentication?
For a request made in a logged-in WordPress context, obtain a nonce for the wp_rest action. WordPress checks it as part of cookie authentication. A custom request should include the value in the X-WP-Nonce header. Without a nonce, WordPress treats the request as unauthenticated even if the user is logged in.
#1 Best Overall
- POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
- WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
- FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
- TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
- BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
For plugin and theme code, WordPress recommends using its built-in JavaScript API, which handles nonce delivery. Consult the REST API authentication guide for the documented flow.
How do I use an Application Password with the WordPress REST API?
Application Passwords are user-specific credentials for programmatic access. Create a separate, labeled password for the integration rather than sharing the user’s main account password. WordPress shows the generated password only once; save it securely at creation, and revoke it when it is no longer needed. The feature was introduced in WordPress 5.6 and is available by default when requests are served over HTTPS.
Rank #2
- HARDWARE 2FA AND MFA: FIDO Alliance Certified FIDO2 v2.1 with CTAP2 plus legacy U2F and CTAP1 for strong two-factor login and passwordless sign-in on services that support security keys
- BUILDING ACCESS ON ONE CARD: MIFARE DESFire EV2 4K applet with AES encryption adds office door and physical access control alongside digital authentication
- CERTIFIED SECURE ELEMENT: An NXP Common Criteria EAL6+ certified secure controller and Java Card platform protects your keys on a tamper-resistant chip
- DUAL INTERFACE SMART CARD: Contactless NFC ISO 14443 plus ISO 7816 contact reader support in an ISO 7810 ID-1 format that is passive and needs no battery
- SWISS ENGINEERED DESIGN: Built by Cryptnox as a single card for authentication and access control and backed by a 2 year warranty
- In WordPress, open the user’s profile and find the Application Passwords section.
- Enter a descriptive label for the integration and generate the password.
- Copy and store the password securely; it cannot be retrieved from the profile later.
- Send the WordPress username and Application Password using HTTP Basic authentication over HTTPS.
The official guide demonstrates a request to inspect the authenticated user’s account:
curl --user "USERNAME:APPLICATION_PASSWORD" https://example.com/wp-json/wp/v2/users/me
Replace the example host, username, and password with your own. Do not place the credential in public source control, logs, or client-side code. These are practical protections for a reusable secret; HTTPS protects it in transit.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- Ultra-Compact FIDO2 Security Key - Plug-and-stay or carry on a keychain. This USB-A hardware security key offers portable, always-on protection for desktop and mobile use. (Item Size: 0.75 X 0.74 IN x 0.25 IN)
- USB-A Hardware Key for All Devices - Works with USB-A ports on PC, Mac, Android, and other laptop/notebook device. Enables secure, cross-platform login with FIDO2.0 passkey support.
- FIDO Certified Security Key - Meets FIDO and FIDO2 standards. Works with Google, Microsoft, GitHub, Dropbox, and more. Please check service compatibility before purchase.
- Passwordless Login with Passkey - Supports passkey login via WebAuthn and CTAP2. Enjoy password-free sign-ins where supported. Not all websites or services currently support passkeys.
- Advanced Multi-Factor Authentication - Offers 200 FIDO2 passkey slots and 50 OATH-TOTP slots. Strong, flexible 2FA/MFA support across various apps and authentication platforms.
Authentication is not authorization
A valid cookie or Application Password establishes which WordPress user made the request; it does not automatically grant access to every REST API operation or resource. WordPress applies its authentication restrictions, and endpoint permission checks and the user’s capabilities determine what the request may do. Use an account with only the capabilities the integration needs, where the site’s roles and workflow allow it.
A REST nonce is a cross-site request forgery (CSRF) defense, not a substitute for authentication, authorization, or access control. WordPress’s nonce guidance explicitly warns: “Nonces should never be relied on for authentication, authorization, or access control.” Protect sensitive operations with appropriate capability checks. See the WordPress nonce security guide and the REST API FAQ.
Rank #4
- Security Key : Protect your online accounts against unauthorized access by using FIDO2 and U2F authentication with T110. It's the world's most protective security key that works with windows, Mac OS, Linux as well as Chrome, Firefox, Edge and many other major browsers.
- Certified with the new FIDO2 standard, T110 provides the benefit of fast login and strong protection against phishing, account takeover as well as many other online attactks.
- Works with : Bank of America, Github, Google, Microsoft, DUO, Twitter, Facebook, Dropbox, Apple, ebay, BINANCE, mor and more.
- Fits USB-A port : Insert the T110 security key into the USB-A port of each service and log in conveniently with one touch
- For the driver download and user guide, please visit TrustKey Solutions Home support page.
Why does my WordPress REST API Authorization header not work?
Check the request and the server path systematically:
- Confirm HTTPS. Application Passwords are intended to be sent over HTTPS and are available by default when requests are served over HTTPS.
- Check which password you are using. For Basic authentication, use the Application Password with the WordPress username, not the account’s normal password.
- Check whether the feature is disabled. Site code or a security plugin may disable Application Passwords.
- Check header forwarding. CGI or web-server configuration can strip the
Authorizationheader before WordPress receives it. The official FAQ includes examples for forwarding it through Apache and Nginx. - For a browser cookie request, check the nonce instead. A logged-in session without a valid
X-WP-Nonceis treated as unauthenticated.
See the WordPress REST API FAQ for the Apache and Nginx configuration examples and additional troubleshooting.
Recommended Free Tools
When should I use OAuth or JWT?
WordPress documentation lists OAuth 1.0a Server and JWT as examples of authentication added by plugins, rather than built-in alternatives equivalent to cookie authentication and Application Passwords. The documentation does not compare the security or current compatibility of individual plugins. Before choosing one, review its present maintenance status, code and configuration, and compatibility with your site. The REST API handbook’s overview provides the broader API context.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




