How do I fix an invalid or revoked API key?

2 min read · Last updated June 2026

Paste a working API key into the plugin settings and click Reconnect. Optimizing was paused because your key stopped working, but your already-optimized images keep being served and nothing is deleted.

What you see

An admin notice reads Your API key is invalid or was revoked. Optimizing is paused - reconnect in SlashImage settings. The same problem also shows as a Reconnect needed connection pill, a Paused - reconnect your API key status on waiting images, and API key is invalid or has been revoked. on a failed image.

Why this happens

  • The key was regenerated or deleted in your dashboard, so the key saved in the plugin no longer exists. See where to find your API key.
  • The key is locked to certain domains and your site is not on the list, so the request is rejected as if the key were invalid. See lock a key to your domains.
  • The key was pasted incompletely, so it does not match a real key.

How to reconnect

The SlashImage plugin settings screen, showing the disconnected key field, the Reconnect button, and the connection status pill.

  1. In your WordPress admin, go to Media > SlashImage.
  2. Copy your API key from your SlashImage dashboard (where to find it). If the old key was deleted, regenerate one first.
  3. Paste it into the disconnected-key field and click Reconnect.
  4. Confirm the pill now reads Connected. Optimizing resumes, and paused images work through the queue on their own.

If the key still will not take

The message in settings tells you what went wrong:

  • API key format is invalid. Keys look like sk_live_… or sk_sub_… and are 48 hex characters long. - the key is the wrong shape. A real key starts with sk_live_ or sk_sub_; copy the whole thing with no extra spaces.
  • Key was rejected by the API. Double-check that you copied the entire key. - the format is fine but the service did not accept it. Copy the full key again, or generate a new one.
  • A message about not reaching the service, like Could not reach the API. Check your server's outbound network access., is a connection problem, not a key one. See Why can't SlashImage connect to the optimization service?.

See also

Was this helpful?