Skip to main content
Version: 4.x

WordPress JWT Error Codes

Every error response from Simple JWT Login includes a numeric error_code field. Use the table below to look up the meaning of a specific code and how to resolve it.

Not sure where to start? See JWT troubleshooting.

Error responses follow this format:

{
"success": false,
"data": {
"message": "Human-readable error message",
"error_code": 48
}
}

Errors raised while authenticating a request to another REST route (for example /wp/v2/posts) use the standard WordPress REST error format instead. This happens when an API key is rejected (code: simple_jwt_login_api_key_error), when the JWT Middleware rejects a JWT (code: simple_jwt_login_middleware_error), and for errors from the /api-keys management endpoints. The numeric code is in data.error_code:

{
"code": "simple_jwt_login_api_key_error",
"message": "Human-readable error message",
"data": {
"status": 401,
"error_code": 84
}
}
tip

Read the code from data.error_code - it is in the same place in both formats.

HTTP status changed in 4.2.0

Client errors that used to answer HTTP 500 now answer their real status. The error_code values didn't change, so code that checks error_code keeps working. Code that checks only the HTTP status must be updated:

  • 401 - two-factor errors 106, 107, 109, interim 2FA JWT used as a normal JWT 110, JWT without the "JWT login by" claim 29, 30, invalid Facebook or GitHub code or token 98, 99, 102, 103, Google id_token issued for another client 118
  • 403 - revoked token endpoints called by a non-administrator 115, OAuth account email not verified 111 (Auth0), 112 (GitHub), 119 (Google)
  • 404 - Facebook or GitHub user not found 100, 104, revoked token ID not found 116
  • 422 - invalid OAuth provider or missing OAuth code or token 69, 71, 77, 97, 101, missing reset password code 60, API key without a name or permissions, or with an unknown permission 85, 86, 87
  • 429 - too many wrong two-factor codes 108

JWT library errors (1-21) answer 400, other validation errors answer 422, and errors with no status of their own answer 500.

Codes by feature​

FeatureCodes
JWT decoding, signature, expiry, audience, and user lookup1-22, 54, 130
Revoked or 2FA-interim JWT55, 110
Authentication (/auth)45-48, 113, 131
Refresh, validate, revoke49-51, 53, 81-83, 131
Autologin23-30, 68
Register user31-38, 52
Delete user39-42
Reset password56-63, 65, 66, 76, 93, 95, 96
Protect endpoints75, 114
API keys84-92, 132
Revoked tokens administration115-117
OAuth - provider and login state69, 70, 129
Google71-74, 118, 119
Auth077-80, 111
Facebook97-100
GitHub101-104, 112
Two-Factor105-110, 133
AI Abilities120-128
Auth codes94
Routing and plugin settings43, 44, 67

All codes​

Error CodeMessageDescription
1Key may not be emptyJWT is missing from request
2Wrong number of segmentsThe JWT contains 3 parts, separated by dots (Header, Payload, Signature). Your JWT does not have 2 dots in it.
3Invalid header encodingThe encoding of the first part of the JWT, is invalid. This means, that the first part of your JWT is incorrect.
4Invalid claims encodingThe second part of your JWT is invalid.
5Invalid signature encodingThe signature that you provided in "JWT Decryption key" is invalid.
6Empty algorithmThis means, that your JWT has no algorithm specified.
7Algorithm not supportedThe algorithm present in your JWT, is not supported by this plugin.
8Algorithm not allowedThe provided algorithm is not allowed by this plugin.
9'kid' invalid, unable to lookup correct keyYour JWT is malformed.
10'kid' invalid, unable to lookup correct keyYour JWT is malformed.
11Signature verification failedInvalid "JWT Decryption key" provided in config.
12Cannot handle token prior to <date>Check that this token has been created before the current time. Timestamp verified from nbf.
13Cannot handle token prior to <date>Check that this token has been created before the current time. Timestamp verified from iat.
14Expired tokenJWT is expired.
15Algorithm not supportedAlgorithm not supported when JWT was signed.
16OpenSSL unable to sign dataError while JWT is signed with OpenSSL.
17Unsupported sign functionInvalid Algorithm provided for JWT when signing
18Algorithm not supportedInvalid Algorithm while trying to verify the JWT
19OpenSSL errorThis is a generic OpenSSL error.
20Null result with non-null inputDecoded JWT is null.
21Null result with non-null inputEncoded JWT is null
22Unknown JSON errorThis is a generic error by JWT. More details are provided in the message.
23Wrong Request.JWT is missing in the auto-login process.
24User not found.This error occurs when the user is not found. For login and delete endpoint: there is no user in WordPress with the email or ID provided in JWT.
26Auto-login is not enabled on this website.You have to enable auto-login from plugin settings.
27Invalid Auth Code provided.The Auth code provided is invalid or missing. You should use one that you have saved in your plugin settings
28This IP is not allowed to auto-login.You can not auto-login from this IP. Some IP's are specified in plugin settings that can auto-login into WordPress
29Unable to find property in JWT.The user sub-key property can not be found in JWT
30Unable to find property in JWT.The user key property can not be found in JWT
31Register is not allowed.Register is disabled from settings
32Invalid Auth CodeInvalid auth code provided on register endpoint. You can use auth codes that are generated in your plugin settings.
33This IP is not allowed to register users.You can not register users from this IP. The allowed IPs are saved in plugin settings
35Missing email or password.Missing email or password from your register new user request
36Invalid email address.The value provided for email is not a valid email.
37This website does not allow users from this domain.The email domain is not allowed to register to this WordPress. The allowed domains are saved in plugin settings.
38User already exists.The user that you are trying to create already exists. Try a different email address.
39Delete is not enabled.The plugin delete endpoint is not enabled for this website. This can be enabled from plugin settings.
40Missing AUTH KEYMissing Auth Key from Delete. You can find your generated auth keys in plugin settings.
41You are not allowed to delete users from this IPYou can not delete users only from the IPs that are set in plugin settings.
42The 'jwt' parameter is missing.The JWT parameter is missing from the request.
43Invalid method for this route.The route that you are calling does not exist.
44Invalid route name.Route name is invalid.
45Authentication is not enabled.Authentication enabled is set to "No" in the plugin settings.
46Authentication missing email.Your request does not contain the email address.
47Authentication missing password.Password is missing from the request.
48Authentication wrong credentialsEmail or password is incorrect.
49JWT payload is not correct.Check your JWT payload. After decoding it, it resulted null. it should be an JSON.
50JWT is too old to be refreshed.The JWT generated time is too old. You can not refresh this token.
51JWT is missing from /auth/refreshThe JWT parameter was not sent to the /auth/refresh endpoint.
52Unable to create user.There was an error while trying to create the user.
53The jwt parameter is missing.The JWT is missing from reset password, revoke token, or validate user requests.
54WordPress user not foundUnable to find a valid user in the provided JWT.
55This JWT is invalid.The JWT has been revoked. It can not be used anymore.
56Reset Password is not allowed.The Reset Password endpoint is disabled.
57Route called with invalid request method.The Reset Password endpoint is called with an invalid HTTP method. Only PUT and POST are allowed.
58Invalid Auth Code ( %s ) provided.The Reset Password endpoint is called with an invalid AUTH CODE.
59Missing email parameter.Missing or empty email parameter when calling the Reset Password endpoint.
60Missing code parameter.Missing code parameter when calling change user password endpoint.
61Missing new_password parameter.Missing new_password when calling the change user password endpoint
62Invalid code provided.The code and user_email does not match when calling the Reset Password endpoint.
63Missing email parameter.Missing email parameter when calling the Send reset password endpoint.
64Wrong user.No longer returned since 4.2.0: the Send reset password endpoint answers 200 for unknown emails so it can't be used to find which emails have an account.
65Invalid flow type.Invalid plugin settings for Reset password flow.
66You need to add the {{CODE}} variable in email body.The {{CODE}} parameter is missing from Reset Password email body.
67Something is wrong. We can not save the settings.Something is wrong with the plugin configuration. The _wpnonce field is missing or it is invalid.
68'The JWT issuer(iss) is not allowed to auto-login.The JWT is issued by an authorized issuer.
69The Oauth provider is invalid.Invalid provider parameter provided.
70This Oauth provider is not available.OAuth provided is not enabled or unavailable.
71The code or id_token parameter is missing from request.The code or id_token parameter is missing from request when connecting with Google OAuth.
72The code you provided is invalid.The Google OAuth endpoint has received an invalid code.
73The provided id_token is invalidThe Google OAuth endpoint has received an invalid id_token.
74Wrong user credentials.The Google OAuth could not find a user in the provided JWT.
75JWT is not present and we can not search for a user.The JWT is missing from the request when accessing a protected endpoint.
76The custom email subject is empty.The Reset Password custom email subject is empty in the plugin settings.
77The code or access_token parameter is missing from request.The code or access_token parameter is missing when calling the Auth0 OAuth endpoint.
78The code you provided is invalid.The Auth0 authorization code is invalid.
79The provided token is invalid.The Auth0 access_token is invalid or rejected by the Auth0 userinfo endpoint. Since 4.2.0 it is also returned for an opaque access token, unless Allow opaque access tokens is on.
80Wrong user credentials.No WordPress user was found matching the Auth0 account.
81Refresh Token endpoint is not enabled.The Refresh Token endpoint is disabled in the plugin settings.
82Validate Token endpoint is not enabled.The Validate Token endpoint is disabled in the plugin settings.
83Revoke Token endpoint is not enabled.The Revoke Token endpoint is disabled in the plugin settings.
84You must be logged in to manage API keys.You are not authenticated or not authorized to manage this API key.
85API key name is required.The name parameter is missing when creating or updating an API key.
86At least one permission is required.The API key has no permissions defined. Provide at least one valid permission.
87Invalid permission: %sThe API key contains an unrecognized permission value.
88Failed to create API key.A database error occurred while inserting the new API key.
89Invalid API key ID.No API key was found with the provided ID.
90Failed to update API key.A database error occurred while updating the API key.
91Failed to revoke API key.A database error occurred while revoking the API key.
92Failed to delete API key.A database error occurred while deleting the API key.
93This JWT can not change your password.The JWT provided does not match the user account whose password is being changed.
94Auth Code is required.An auth code is required but was not provided in the request.
95Invalid email parameter.The email address provided in the change-password request is invalid.
96Invalid email parameter.The email address provided in the send-reset-password request is invalid.
97The code or access_token parameter is missing from request.The code or access_token parameter is missing when calling the Facebook OAuth endpoint.
98The code you provided is invalid.The Facebook authorization code is invalid.
99The provided Facebook access_token is invalid.The Facebook access_token is invalid or rejected.
100Wrong user credentials.No WordPress user was found matching the Facebook account.
101The code or access_token parameter is missing from request.The code or access_token parameter is missing when calling the GitHub OAuth endpoint.
102The code you provided is invalid.The GitHub authorization code is invalid.
103The provided GitHub access_token is invalid.The GitHub access_token is invalid or rejected.
104Wrong user credentials.No WordPress user was found matching the GitHub account.
105Two-factor authentication plugin is not active.The Two-Factor plugin is not installed/activated or the integration is not enabled in Simple JWT Login settings.
106Invalid interim JWT claims.The interim JWT provided for 2FA verification has invalid or missing claims.
107Invalid or expired two-factor session. Please authenticate again.The 2FA nonce has expired or is invalid. The user must authenticate from the beginning (401).
108Too many failed attempts. Please wait N seconds.The 2FA verification is rate-limited due to too many failed attempts.
109The two-factor code is missing / Invalid two-factor code.The 2FA code is missing or does not match. After too many wrong codes (30 by default) the user's password is reset and emailed, and the message asks the user to check their email.
110This JWT requires two-factor verification before it can be used.The provided JWT is an interim 2FA JWT and cannot be used for regular authenticated operations until 2FA is completed.
111Email address is not verified.The Auth0 account email is not verified, and unverified emails are not allowed in the Auth0 integration settings.
112No verified primary email found in the GitHub account.The GitHub account has no verified primary email, and unverified emails are not allowed in the GitHub integration settings.
113Authentication with password_hash is not enabled.The request sent a password_hash parameter, but authenticating with a password hash is disabled in the plugin settings.
114You do not have the required role to access this endpoint.The authenticated user does not have one of the WordPress roles required to access this protected endpoint.
115You must be an administrator to manage revoked tokens.Only users with the manage_options capability (administrators) can list or delete entries on the /revoked-tokens endpoints.
116Invalid revoked token ID.The id passed to DELETE /revoked-tokens/{id} is missing, not a positive number, or no revoked token entry exists with that ID.
117Failed to delete revoked token entry.A database error occurred while deleting the revoked token entry.
118The provided id_token was not issued for this website.The Google id_token audience (aud) does not match the Google Client ID saved in the plugin settings - it was issued for another client. Turn on Allow tokens issued for other Google clients to accept it (not recommended).
119The email address of this Google Account is not verified.The Google id_token reports email_verified: false, so the Google Account cannot be used to log in.
120Unknown settings section.AI Abilities: the requested settings section does not exist. Call simple-jwt-login/get-settings to list the available sections.
121Unknown setting: %sAI Abilities: the setting key does not exist in that section. Only existing keys can be changed.
122The setting "%s" cannot be changed through AI abilities.AI Abilities: the setting is a secret or human-only. Change it from the plugin settings page.
123Invalid value for setting: %sAI Abilities: the value has the wrong type, no settings were provided, or a list operation is malformed.
124No webhook matches this index and URL.AI Abilities: the webhook index and URL sent to remove a webhook do not match. List the webhooks again and retry.
125A webhook needs a URL and at least one valid event.AI Abilities: the webhook being added has an invalid URL or no valid events.
126The list item %s does not match.AI Abilities: the list item at that index no longer matches the match value (the settings changed meanwhile). Read the settings again and retry.
127%d is not a Simple JWT Login error code.AI Abilities: the explain-error ability was called with a code that does not belong to Simple JWT Login.
128AI permission denied for this setting.AI Abilities: the change needs an AI permission that the administrator has not granted (for example, "Allow changing roles"), or it tries to assign a role with administrator capabilities. Enable it in Integrations > AI Abilities (MCP).
129The OAuth state is invalid. Please start the login again.The browser OAuth callback state is missing or doesn't match the sjl_oauth_state_<provider> cookie set by the login start (login CSRF protection). Shown on the login page and written to the audit log. Start the login from GET /oauth/token?provider=<provider>.
130The JWT was not issued for this audience (aud).An expected audience is set (Authentication Expected audience, or the JWT Rule's Expected audience (aud)), and the JWT's aud claim doesn't contain it. JWTs issued before the audience was set have no aud - log in again.
131Unable to save the refresh token./auth or /auth/refresh could not save the new refresh token in the database, so no tokens were issued (500). Check the database and that the refresh tokens table exists, then log in again.
132The expires_at value must be a date such as 2030-01-31 or 2030-01-31 23:59:00 (UTC).The API key expires_at is not a valid date. Send a UTC date (2030-01-31, 2030-01-31 23:59:00), an ISO 8601 date with a zone (2030-01-31T23:59:00Z), or null for no expiry.
133Unable to create two-factor nonce./auth or the OAuth login could not store the two-factor session (database or object cache write failed) for a user with 2FA enabled, so no interim JWT was issued (500). Retry, and check the server error log. Before 4.2.0 this case shared code 107 with an expired session.