You added an API key to a plugin, tried to use it, and got this:

Error: Request Failed, Status 400

The key field looks filled in, so the key seems fine. It may not be. This exact message was reported on the issue tracker of the Obsidian Book Search plugin. A commenter there said the key had not been copied, and they didn't notice because something else was already on the clipboard. Re-copying fixed it. That is one thread, so treat it as one cause worth ruling out first because it takes under a minute. It is not the only way to get a 400.

Why it happens

A 400 means the server refused the request because it considered it a client error. MDN lists malformed request syntax, invalid request message framing, or deceptive request routing as the typical reasons. A plugin sending a sentence, a URL or a code snippet where a key should be is a malformed request from the server's point of view.

The causes, most common first:

  1. The copy didn't register. The system clipboard holds one item. If your copy failed (the selection missed, the copy button didn't fire, the page lost focus), the clipboard keeps its old contents. Paste still works, so nothing warns you.
  2. A partial or padded paste. A drag-select that misses the last character, or a stray space or line break at either end, makes the key invalid.
  3. The wrong kind of key. Many services issue several key or token types, and a plugin wants one specific type.
  4. A replaced or revoked key. If you generated a new key, the old one may be dead.
  5. A different setting is wrong. Another field you filled in at the same time can trigger the same message.

MDN also notes that repeating the request without modification will fail with the same error. Pressing retry won't help. Something has to change.

Step-by-step fixes

Fix 1: Re-copy the key and check what you pasted

  1. Go back to the page or dashboard where the key is shown.
  2. Copy the key again, using its copy button or by selecting the full value and pressing ⌘C (Command-C) on Mac or Ctrl+C on Windows.
  3. Open a harmless place to paste: a blank note, a text field, a scratch file.
  4. Paste with ⌘V (Command-V) or Ctrl+V.
  5. Check that what appears is the key: the right length, the right start and end, nothing extra.
  6. Select all of it, copy it again, and paste it into the plugin's key field.
  7. Retry the action that gave the error.

If you can't tell whether the key is complete, compare its first and last few characters with the original on the provider's page.

Fix 2: Look for a partial or padded paste

If the pasted value looks like the key but the error stays:

  1. Paste into the scratch spot and look at both ends of the value.
  2. Delete any space or empty line before or after it.
  3. Copy it again from the scratch spot and paste it into the plugin field.

Some provider dashboards show a key only once. If you can't see the full key again, generate a new one and copy it straight away.

Fix 3: Rule out other causes of a 400

If a clean paste still fails, check these:

  • Key type. Use the exact type the plugin's README asks for.
  • Replaced key. Use the newest key you generated for that service.
  • Other plugin settings. Re-check every field you changed in the same session.
  • Plugin version. Obsidian's help says community plugins don't update automatically. If the plugin is out of date, update it under Settings > Community plugins, then check its issue tracker for the same error.
Cause What you see Fix
Copy didn't register Field filled with unrelated text Re-copy, verify in a scratch spot
Partial paste Key looks right but ends early Reselect the whole value, copy again
Extra space or line break Key looks right, error stays Trim both ends
Wrong key type Key is correct but rejected Generate the type the plugin asks for
Old or revoked key Worked before, fails now Use the newest key

Fix 4: See what you copied earlier

Once you copy something new, the old value is gone. On macOS 14 (Sonoma), 15 (Sequoia) and 26 (Tahoe), nothing built in keeps a list of earlier copies, so you need a clipboard manager. On Windows, clipboard history opens with Win+V, but it is off by default and has to be turned on first. How to Use Clipboard History on Windows has the steps, and Best Clipboard Manager for Mac compares Mac options.

What Gubb's clipboard history covers here

Gubb is a notes app with a clipboard history panel. For this problem it does two things: it shows your recent text copies, so you can see what the clipboard held, and it lets you copy an older value again. It does not prevent a failed copy, and it does nothing about the plugin's error itself. If you only want to avoid a wrong paste, Fix 1 is enough and needs no app.

  1. Hover the right edge of the Gubb window and click Clipboard History.
  2. Scan the items, grouped by date with the time shown. Pinned items sort first.
  3. Type the first characters of the key into Search clipboard....
  4. Hover the item and click Copy to clipboard, then paste into the plugin's key field in the other app.

Limits to know:

  • Capture starts when you first open the panel in a session. Nothing is recorded before that, so open the panel first, then copy the key.
  • Text only. Images, files and rich text are not captured.
  • No pasting into other apps. Paste to note inserts into a Gubb note only, so use Copy to clipboard and paste yourself.
  • Keys are stored in plain text. Gubb's database is unencrypted and does not filter passwords. When you're done, remove the key with Delete item or Clear History. Pinned items survive a clear while Keep favorites is on, which is the default.

Gubb has a 7-day free trial of the direct macOS download at gubb.net/download, and a Microsoft Store listing for Windows.

Checklist before you try again

  • The copy came straight from the provider's page, not from memory of an earlier copy.
  • You pasted it into a scratch spot and saw the full key.
  • No space or line break sits at either end.
  • It is the key type the plugin asks for, and the newest one you made.
  • The plugin is up to date.
  • You removed the key from any scratch note or clipboard history afterward.

If nothing works

Open an issue on the plugin's tracker or contact its developer. Obsidian's help page says its own email support covers only commercial licenses, your account, payment, and add-on services, so plugin bugs go to the plugin author. Include the exact error text, the plugin and app versions, what you did just before, whether the key is new, and that you verified the pasted value. Leave the key itself out.

Subject: "Error: Request Failed, Status 400" after adding API key

Plugin version: (your version)
App version: (your version)
OS: (macOS or Windows, and version)

What happened: After adding my API key in the plugin settings,
I get "Error: Request Failed, Status 400".

What I tried: I re-copied the key, pasted it into a scratch
note to confirm it was complete, trimmed spaces at both ends,
and pasted it again. The key was created on (date) and is the
type the README asks for. Same error.

I have not included the key. Let me know what logs you need.

Common questions

Does Status 400 always mean the key is wrong?

No. It means the server found the request malformed or invalid. A bad key is a common reason, but a wrong value in another setting can produce the same status.

Why didn't my paste show an error immediately?

Pasting only inserts whatever is on the clipboard. Nothing checks it against the service until the plugin sends a request, which is when the 400 comes back.

How do I check what's on my clipboard without a new app?

Paste into a blank text field or note and read it. It's the quickest check on any system, and it works before you paste the key anywhere that matters.

Should I revoke the key after a failed attempt?

Only if it ended up somewhere others can see it, such as a public issue or screenshot. Otherwise a failed request doesn't expose the key.