Connect with an API key
Some setups cannot open a browser: a server, a scheduled job, or a client that only lets you set a fixed header. Connect those with an API key. Create one in Account Settings > API Keys (see API keys), then send it in the Authorization header of every call to the server URL.- A key reads what you can view, as your browser sign-in does. It is read-only (content:read). Only Authors can create one.
- When a key fails, the server answers 401 or 403 with the reason. It does not start the browser sign-in (OAuth) instead. Fix the key.
- Use the browser sign-in where you can. A key does not go through the consent page, SSO or MFA, so treat it like a password.
An administrator on an on-premises or Hosted server can turn API keys off or limit them to certain IP addresses; the two 403 messages above mean that. The publisher settings in Data and permissions apply to a key in the same way.
- API keys - Create, expire, revoke and keep a key safe.
Transport and authorization
If a person uses it in a browser, use the browser sign-in. If there is no browser, or a job runs by itself, use an API key.
Every call needs Authorization: Bearer <access token or API key>. A browser session cookie does not authenticate MCP calls. The consent page, the metadata URLs and the details of failed calls are in Data and permissions.
