Documentation / Getting Started / Create an API Token

Create an API Token

Create a token so your code or AI agent can call the OppAlerts API and MCP server.

Before you start

  • You need an OppAlerts account. Log in at oppalerts.com/login.
  • Claude Code, Claude, Codex, and most other MCP clients sign in with OAuth in the browser and do not need a token. See Use OppAlerts in Your AI Agent.
  • Use a token for your own script or a client that cannot sign in with OAuth.

Steps

  1. Open oppalerts.com/app/account/api_tokens. In the profile menu, choose API & MCP Tokens.
  2. Complete the Make a token form. Check api:write only when the script or the agent must create or change campaigns.
  3. Click Make the token, then Copy. The page shows the token only once.

API & MCP Tokens explains the form fields, scopes, expiration date, token revocation, and connected apps.

Test the token

This call does not use an index search. It shows how many calls your account has left today.

curl -X POST https://api.oppalerts.com/v1/account/calls_left \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

An invalid, expired, or revoked token returns HTTP 401.

Use the token

  • Send it in the header Authorization: Bearer YOUR_TOKEN.
  • API: https://api.oppalerts.com/v1/.
  • MCP server: https://mcp.oppalerts.com/mcp.
  • Keep the token secret, just as you would a password.