# invalid_api_key (HTTP 401)

invalid_api_key (HTTP 401) from the GetItDone API: A `gid_` API key was supplied but does not match any active credential.

Seeing this in an AI assistant or MCP connector, not from our API? Read [what "invalid API key" means](https://nowgetitdone.com/blog/invalid-access-token-api-key-meaning).

- **HTTP status:** 401
- **Problem type URI:** https://nowgetitdone.com/docs/api/problems/invalid-api-key

## What it means

A `gid_` API key was supplied but does not match any active credential.

## Likely causes

- The key was revoked, rotated, or belongs to a different environment.
- The key value was truncated or has a stray whitespace/newline.

## How to fix

- Confirm the key is active in Profile → API Keys and copy it again (keys are shown once at creation).
- Check you are using a live key against production and a `gid_test_` key against test data.

## Example problem+json

```json
{
    "type": "https://nowgetitdone.com/docs/api/problems/invalid-api-key",
    "title": "Invalid API key",
    "status": 401,
    "code": "invalid_api_key",
    "request_id": "req_a1b2c3d4"
}
```

## Related

- [Authentication](/docs/api#authentication)
- [What "invalid API key" means in AI assistants and MCP connectors](https://nowgetitdone.com/blog/invalid-access-token-api-key-meaning)
