# Invalid credentials

> The invalid_credentials error (401) means your API key or login credentials are wrong or expired. Learn how to fix authentication.

## Error code

```json
{
  "code": "invalid_credentials",
  "docUrl": "https://doc.mor.payments.ai/errors/invalid-credentials"
}
```

## HTTP status

401

## Cause

The API key or login credentials are wrong or expired.

## How to fix

Verify the Authorization header uses a valid sandbox key (`pai_test_*`). Regenerate the key in Developer Tools if needed.

## Related API

See the [API Reference](/api) for the operation that returned this error.
