Documentation

MCP, CLI & API

API Keys

What API Keys Are For

API keys are for long-running connections from your own agents and scripts, where signing in with OAuth in a browser is not convenient. Signing in is still the normal way to connect an AI app like Claude or ChatGPT. See MCP Configuration for that setup.

Keys use the same account and Meta connection as the web app and require MCP, CLI and API access on your account. They work from different networks.

Create a Key

  1. Open Account > MCP, CLI & API and choose Create API Key in API Keys.
  2. Give the key a name so you can recognize what uses it.
  3. Tick the acknowledgement that the key is for one person and must not be shared, then create it.
  4. Copy the adk_ secret and store it somewhere private. It is shown only once.

Use a Key with the MCP

Send Authorization: Bearer adk_... to https://adsuploader.com/api/mcp. For an MCP client that supports custom headers, a configuration can look like this:

{
  "mcpServers": {
    "ads-uploader": {
      "url": "https://adsuploader.com/api/mcp",
      "headers": { "Authorization": "Bearer adk_..." }
    }
  }
}

Replace adk_... with your key and keep the configuration private.

Use a Key with the CLI

Set ADS_API_KEY through your server or CI secret settings. It overrides the credentials saved in ~/.config/adsuploader/credentials.json. To save a key locally instead, run:

ads login --api-key

Paste the key at the hidden prompt, or pipe it through stdin. The CLI verifies it before saving it. Avoid putting the secret in the command, where it can appear in shell history.

Run ads whoami to check the authentication method. ads config shows it too; only the key prefix is displayed.

One Key per Person

Each account can have one active key by default, for one person. Contact support if you need more keys; admins can raise the limit to 10. Add a team seat for someone else. Never share a key: Ads Uploader may revoke a key that is used by more than one person.

Keys Don't Expire

Keys stay valid until revoked. Unused keys are revoked after 90 days, and we email you when that happens. Time while your plan is paused does not count toward those 90 days.

Revoke a Key

Open Account > MCP, CLI & API, find the key in API Keys, and choose Revoke. Requests using that key will stop working.

ads logout only removes the saved key from that machine; it does not revoke the key. It cannot unset ADS_API_KEY, so remove that variable from your environment or secret settings too.

Browser sign-ins are listed separately under MCP and CLI-Connected AI Apps. Choose Revoke there to revoke a CLI or AI app connection.