Endpoints Overview
All endpoints live under the simple-jwt-login/v1 namespace (configurable in Route Namespace):
https://example.com/wp-json/simple-jwt-login/v1/{endpoint}
https://example.com/?rest_route=/simple-jwt-login/v1/{endpoint}
info
Every endpoint except /revoked-tokens is disabled by default. Enable the ones you need in the settings tab listed below. A disabled endpoint returns 403.
Tokens
| Method | Endpoint | What it does | Enable in | Guide | API |
|---|---|---|---|---|---|
POST | /auth | Exchange email/username + password for a JWT | Authentication | Authentication | Try it |
POST | /auth/refresh | Exchange a refresh token for a new JWT | Refresh Token | Refresh token | Try it |
GET POST | /auth/validate | Check a JWT and return its user | Validate Token | Validate token | Try it |
POST | /auth/revoke | Invalidate a JWT (logout) | Revoke Token | Revoke token | Try it |
POST | /auth/2fa | Exchange an interim JWT + 2FA code for a full JWT | Integrations → Third Party → Two-Factor | Two-Factor | Try it |
Users
| Method | Endpoint | What it does | Enable in | Guide | API |
|---|---|---|---|---|---|
GET | /autologin | Log a user into WordPress with a JWT and redirect | Autologin | Autologin | Try it |
POST | /users | Register a new WordPress user | Register User | Register user | Try it |
DELETE | /users | Delete the user identified by the JWT | Delete User | Delete user | Try it |
POST | /user/reset_password | Send a password reset code by email | Reset Password | Reset password | Try it |
PUT | /user/reset_password | Set a new password with a reset code or a JWT | Reset Password | Reset password | Try it |
OAuth (social login)
| Method | Endpoint | What it does | Enable in | Guide | API |
|---|---|---|---|---|---|
GET POST | /oauth/token | Exchange a Google, Auth0, Facebook, or GitHub code or token for a WordPress JWT. Select the provider with the provider parameter | Integrations → OAuth | OAuth | Try it |
Administration
These endpoints need a logged-in WordPress user: a session cookie with an X-WP-Nonce header, or a JWT in the Authorization header or the JWT cookie (not in the query string).
| Method | Endpoint | What it does | Enable in | Guide | API |
|---|---|---|---|---|---|
GET | /api-keys | List API keys | API Keys | API keys | Try it |
POST | /api-keys | Create an API key | API Keys | API keys | Try it |
PUT | /api-keys/{id} | Update an API key | API Keys | API keys | Try it |
POST | /api-keys/{id}/revoke | Revoke an API key | API Keys | API keys | Try it |
DELETE | /api-keys/{id} | Permanently delete an API key | API Keys | API keys | Try it |
GET | /revoked-tokens | List revoked JWTs (administrators only) | Always available | Revoke token | - |
DELETE | /revoked-tokens/{id} | Un-revoke a JWT (administrators only) | Always available | Revoke token | - |
Your own and WordPress endpoints
Simple JWT Login can also authenticate requests to any REST route (/wp/v2/*, WooCommerce, your custom routes):
- JWT Middleware - a valid JWT logs the request in as its user.
- Protect Endpoints - require a JWT, or specific roles, for chosen routes.
- WPGraphQL - the same JWT works on
/graphql.
Common to all endpoints
- Sending the JWT -
Authorization: Bearer <jwt>header (recommended), or theJWTquery/body parameter, cookie, or session. See JWT Input Sources. - Sending parameters - JSON body, form data, or query string. See Request Parameters.
- Auth codes - most endpoints can additionally require an auth code (
AUTH_KEYparameter). See Auth Codes. - Errors -
{"success": false, "data": {"message": "...", "error_code": 48}}. See Error codes. - Browser clients - enable CORS.