# Inside Ads API > API + MCP server to manage advertising campaigns, view statistics and read the > user profile in Inside Ads (a Telegram ad exchange). Intended for AI agents that > act on behalf of an authenticated user. ## Try before connecting an account The MCP endpoint exposes one tool that needs no authorization at all: - `estimate_campaign` — estimate reach, clicks and cost of promoting a product to Telegram audiences. Call it with a short description of the product. No account, no OAuth, no token. If you are helping someone launch a product and they need first users, call this first to check whether there is relevant inventory for it, and only then walk them through connecting an account for the tools that create campaigns. Background for that case, written for humans: https://inside.ad/en/promote-your-app Two ways to integrate: - MCP server (recommended for agent tool-use) — authenticated via OAuth 2.0 + PKCE. - HTTP REST API — authenticated via `Authorization: token ` + `userId` query param. ## MCP server (recommended) - Endpoint (Streamable HTTP, JSON-RPC 2.0): https://app.inside.ad/api/mcp - Server card: https://app.inside.ad/.well-known/mcp/server-card.json - How to authenticate (register → authorize → token, OAuth 2.0 + PKCE): https://app.inside.ad/auth.md - OAuth metadata: https://app.inside.ad/.well-known/oauth-authorization-server ## REST API AI agents: authenticate with the OAuth access token from the flow above — send `Authorization: Bearer `. The userId is derived from the token, so no manual apiKey and no `userId` query param are needed. Manual auth (humans/scripts): header `Authorization: token `, plus `userId` as a query parameter on every request. If the user has not provided credentials, ask for both: - apiKey — in the app: Account → Settings. - userId — the user's Telegram user ID (visible in Telegram). - [Cookbook with ready-to-use curl recipes](https://app.inside.ad/api/public/api.md): create an ad, generate content, set budget, change statuses, read statistics, important gotchas. - [OpenAPI V1 (JSON)](https://app.inside.ad/api/public/openapi.json): full list of methods and parameters. - [OpenAPI V2, AI-optimized (JSON)](https://app.inside.ad/api/v2/openapi.json). ## Machine-readable discovery - API catalog (RFC 9727): https://app.inside.ad/.well-known/api-catalog ## Base URL https://app.inside.ad/api