Skip to content

The key was not accepted or is invalid

The bot checks the keys twice: the format, right when you type them in, and the keys themselves, with a request to the exchange. Each stage has its own answer.

What it means

Bot answerWhat is wrong
“Send exactly TWO values separated by a space: the API key first, then the secret key. You sent 1 part(s). Example: AbCdEfGhIjKlMnOpQr 1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r”The key and the secret must be in one message, separated by a space
“Invalid API key length: 20 chars (must be 18). Copy the full key from Bybit, without extra spaces.”A Bybit key is 18 characters, a secret is 36; something extra was copied, or a part was left out
“The data you sent does not match the API key format”The message contains some other text, not the keys
“This API key pair already exists in the system”The pair is already linked to another bot — a new pair is needed
“API key is invalid” / “Failed to verify API keys”The exchange did not accept the key: it was deleted, typed with a mistake or restricted by IP
“API keys have expired. (You can update them in bot settings)”The key on Bybit has reached the end of its validity period
“API keys are invalid. (You can update them in bot settings)”The key of a working bot stopped being accepted by the exchange

Why it happens

  • The key or the secret was copied incompletely, with a space, or in the reverse order.
  • The key was deleted or reissued on Bybit, while the bot still has the old one.
  • The validity period set for the key on the exchange has ended.
  • The key is restricted by IP, and the list does not contain the IP the bot showed during the connection.
  • The key permissions were changed — see “API keys do not have the required permissions”.

What to do

  1. Issue a new key pair on Bybit with the right to trade on the market you need and without the withdrawal right.
  2. Copy the key (18 characters) and the secret (36 characters) in full.
  3. Bot card → Bot settingsUpdate API keys → send the pair in one message: the key first, then the secret, separated by a space. The bot answers “API keys successfully updated”.
  4. If the bot was paused because of the keys, take it off pause after the update. A Grid bot writes “3 consecutive order placement errors (last: …). Check the balance, API keys and settings, then tap ‘Resume’” — tap ▶️ Resume. A DCA bot writes “Could not start a new cycle: … The bot is paused — check the API keys and balance, then tap ‘▶️ Start’” — tap ▶️ Start.

You do not need to delete the bot for the sake of new keys, and while it has active trades you cannot delete it anyway.

When to contact support

If the new pair was issued correctly, the length matches, and the bot answers “Failed to verify API keys” several times in a row — write to support. Do not send the secret itself in the conversation.