Skip to main content
Version: 4.x

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​

MethodEndpointWhat it doesEnable inGuideAPI
POST/authExchange email/username + password for a JWTAuthenticationAuthenticationTry it
POST/auth/refreshExchange a refresh token for a new JWTRefresh TokenRefresh tokenTry it
GET POST/auth/validateCheck a JWT and return its userValidate TokenValidate tokenTry it
POST/auth/revokeInvalidate a JWT (logout)Revoke TokenRevoke tokenTry it
POST/auth/2faExchange an interim JWT + 2FA code for a full JWTIntegrations → Third Party → Two-FactorTwo-FactorTry it

Users​

MethodEndpointWhat it doesEnable inGuideAPI
GET/autologinLog a user into WordPress with a JWT and redirectAutologinAutologinTry it
POST/usersRegister a new WordPress userRegister UserRegister userTry it
DELETE/usersDelete the user identified by the JWTDelete UserDelete userTry it
POST/user/reset_passwordSend a password reset code by emailReset PasswordReset passwordTry it
PUT/user/reset_passwordSet a new password with a reset code or a JWTReset PasswordReset passwordTry it

OAuth (social login)​

MethodEndpointWhat it doesEnable inGuideAPI
GET POST/oauth/tokenExchange a Google, Auth0, Facebook, or GitHub code or token for a WordPress JWT. Select the provider with the provider parameterIntegrations → OAuthOAuthTry 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).

MethodEndpointWhat it doesEnable inGuideAPI
GET/api-keysList API keysAPI KeysAPI keysTry it
POST/api-keysCreate an API keyAPI KeysAPI keysTry it
PUT/api-keys/{id}Update an API keyAPI KeysAPI keysTry it
POST/api-keys/{id}/revokeRevoke an API keyAPI KeysAPI keysTry it
DELETE/api-keys/{id}Permanently delete an API keyAPI KeysAPI keysTry it
GET/revoked-tokensList revoked JWTs (administrators only)Always availableRevoke token-
DELETE/revoked-tokens/{id}Un-revoke a JWT (administrators only)Always availableRevoke token-

Your own and WordPress endpoints​

Simple JWT Login can also authenticate requests to any REST route (/wp/v2/*, WooCommerce, your custom routes):

Common to all endpoints​

  • Sending the JWT - Authorization: Bearer <jwt> header (recommended), or the JWT query/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_KEY parameter). See Auth Codes.
  • Errors - {"success": false, "data": {"message": "...", "error_code": 48}}. See Error codes.
  • Browser clients - enable CORS.