Overview
JWT Authentication for WP REST API describes itself as: “Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.”
It is active on 50,000+ WordPress sites and rated 4.4 out of 5 by 53 users on WordPress.org. Developers can extend it through 0 actions and 7 filters, listed below.
How to install JWT Authentication for WP REST API
- Open the plugin installer. In your WordPress dashboard go to Plugins → Add New Plugin.
- Search for it. Type “JWT Authentication for WP REST API” and pick the one by tmeister.
- Install and activate. Click Install Now, then Activate.
Install with a zip file or WP-CLI
Download the zip from the WordPress.org plugin page, then go to Plugins → Add New Plugin → Upload Plugin, choose the file and click Install Now. Or from the command line:
wp plugin install jwt-authentication-for-wp-rest-api --activateRequirements: WordPress 4.2+ · PHP 7.4.0+ · tested up to WordPress 7.1.4
Hooks & customisation
JWT Authentication for WP REST API 1.5.0 fires 0 actions and 7 filters. Use them from your child theme or a snippets plugin to change how it behaves without editing its files.
// Let the user modify the data before send it back
apply_filters( 'jwt_auth_token_before_dispatch', $data, $user );
// Filter in public/class-jwt-auth-public.php
apply_filters( 'jwt_auth_algorithm', 'HS256' );
// Filter in public/class-jwt-auth-public.php
apply_filters( 'jwt_auth_cors_allow_headers', 'Access-Control-Allow-Headers, Content-Type, Authorization' );
// Filter in public/class-jwt-auth-public.php
apply_filters( 'jwt_auth_expire', $issuedAt + ( DAY_IN_SECONDS * 7 ), $issuedAt );
// Filter in public/class-jwt-auth-public.php
apply_filters( 'jwt_auth_not_before', $issuedAt, $issuedAt );
// Filter in admin/class-jwt-auth-admin.php
apply_filters( 'jwt_auth_survey_webhook_url', Jwt_Auth::REMOTE_API_URL.'/api/survey' );Need JWT Authentication for WP REST API customised?
Tell us what you want changed, added or fixed and we'll reply with an estimate.
WP EXPERTS is independent and not affiliated with tmeister. Plugin names and logos belong to their owners. Version, rating and install figures from WordPress.org, checked Nov 17, 2026.