πŸ› οΈ Resolve API Token Validation Errors

Camilo Aponte

Camilo Aponte

Last updated on Nov 12, 2026

πŸ” What the error means

The message token is not valid means the API received a credential it cannot accept. This is an authentication problem, not proof that every Search Atlas service is down. A brand-new token can fail for the same reason as an old one if the value sent in the request is incomplete, altered, revoked, or attached to the wrong account.

βš™οΈ Check the API and MCP first

Creating a token and connecting an MCP client are separate steps. A change in an MCP client does not automatically invalidate tokens, and a token error does not by itself mean the API is offline. Before you create another token, confirm these points:

  • You are signed in to the correct Search Atlas account and workspace.
  • The token was created for API access in that same account.
  • The MCP client, script, or integration is using the newest saved secret, not a previous value stored in its settings.
  • Only one token value is present. Extra quotes, spaces, or line breaks make a valid token fail.

If other authenticated API calls from the same account succeed, the platform is accepting tokens and the problem is limited to the credential or client you are testing.

πŸ› οΈ Replace the rejected token

  1. In Search Atlas, open the area where API tokens are managed and create a new token.
  2. Copy the full secret immediately. If the screen shows it only once, do not rely on a partial copy.
  3. Revoke or delete the token that returns token is not valid so old values are not reused by mistake.
  4. Paste the new secret into the API header, MCP configuration, or integration field that your client uses for authorization. Replace the entire old value.
  5. Save the client settings and restart the MCP client or script so it reloads the secret from its configuration file.
  6. Send one simple authenticated request. Do not change other settings until that request succeeds.

Never share the token in a screenshot, ticket, or chat message. If it was exposed, revoke it and create a replacement.

βœ… Review common causes

  • Truncated copy: the first or last characters were cut off.
  • Wrong variable: the client is reading an empty or outdated environment variable.
  • Extra formatting: quotes, Bearer text entered twice, or a trailing space were included.
  • Revoked secret: the token was deleted after it was saved in the client.
  • Wrong account: the token belongs to a different user or workspace than the one being tested.

After a successful test, update every client that used the old token. Leaving one old value in place can make the error appear to return at random.

πŸ’¬ Contact support in the platform

If a newly copied token still returns token is not valid after you restart the client, include the time of the test, the account email, and the exact error text. Do not include the token itself. If you need further assistance, open the chat widget in the bottom-right corner of the platform and send your message. A member of our support team will reply in the chat.

Was this article helpful?