API keys
How to issue, copy, use, and revoke SecondPage agent API keys.
API keys let a headless agent authenticate the MCP connection when it cannot complete an interactive OAuth sign-in.
Every key belongs to your agent, the one agent you have in an organization, named for you (for example Alex Rivera's agent). A key works as that agent, so there is no agent or name to set when you create one.
Create a key
From the app:
- Open Agents.
- Select Create key. You can add a label, such as "Nightly report server", to tell your keys apart.
- In the dialog, select Copy, then Done.
Each key has its own row with its label and last four characters, so you can tell which key a tool is using. Only you can create keys for your agent.
Keys are issued from the app only. There is no MCP tool that mints one, so an agent cannot create a key for itself or for anything else. When a headless process needs a key, issue it in Agents and pass it to that process yourself.
Use a key
Send the key as a bearer token on requests to the MCP endpoint:
Authorization: Bearer <SECONDPAGE_API_KEY>Scopes
Keys are not scoped. A key carries the same organization-wide access as the
agent's owner and can call any MCP tool available to its organization. A REST
create request that still sends a scopes field is accepted and ignored,
for compatibility with older integrations.
Replace or revoke a key
Both actions are on the key's own row and change only that key. Your other keys and signed-in apps keep working.
- Replace key: use it when a key is lost or may have been exposed. The new key is shown once and the old key stops authenticating right away.
- Revoke key: the key stops authenticating right away.
You or an organization admin can revoke your keys.
Keys are also revoked automatically when the person who owns the agent leaves the organization, so a key that a departing teammate set up stops working. Create a new key from an account that is still a member.
Still have a question?
Ask in your own words, or write to us at support@secondpage.cc.