Meilisearch Invalid API Key / Missing Authorization Header

Share
Workaround available Self-hosted, Meilisearch Cloud Updated November 15, 2026Based on 2 user reportsHow we research

Quick answer

Send the key as a Bearer token in the Authorization header. Use a search key in the frontend and an admin key on the server, and set a master key of at least 16 bytes.

Most likely fix: Send the key correctly

How to fix it

Try these in order — the most common fix is first.

  1. 1. Send the key correctly

    1. Use the header Authorization: Bearer YOUR_KEY
    2. Use the Default Search key for the frontend, Default Admin key for adding documents and settings
    Did this fix it?
  2. 2. Set or recover keys

    1. Start with --master-key or MEILI_MASTER_KEY, at least 16 bytes of UTF-8
    2. List keys with GET /keys using the master key
    3. On Meilisearch Cloud the master key is generated per project in the dashboard
    Did this fix it?
  3. 3. Never expose admin or master keys

    1. Use the master key only to manage API keys
    2. Create a scoped key with limited actions and indexes for public use
    Did this fix it?

Symptoms

Requests return missing_authorization_header or invalid_api_key; /keys returns missing_master_key.

Why it happens

  • No Authorization: Bearer header sent
  • Wrong or deleted key, or a key made on another instance
  • No master key set, so /keys is unavailable
  • Expired key (expiresAt in the past)

This guide also covers

  • meilisearch invalid api key
  • meilisearch missing authorization header
  • meilisearch master key

Still not working?

If Meilisearch keeps failing, you're not alone. See every Meilisearch problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All missing or lost data guides →

Other Meilisearch errors

All 11 Meilisearch errors and fixes →