Getting Your Developer Token
To use the Microsoft Advertising API (Bing Ads API), you need a developer token. Here's how to get one:
Step-by-Step Process
- Sign in to Microsoft Advertising: Go to the Microsoft Advertising web UI
- Navigate to Settings: Click the gear icon → "Developer Token"
- Generate token: Click "Get token" — your developer token will be displayed
- Save your token: Store it securely; you'll need it for all API calls
Authentication Setup
Microsoft Advertising API uses OAuth 2.0 for authentication:
- Register an app: In Azure Portal, register a new application
- Get client ID and secret: Note these from the app registration
- Set redirect URI: Configure the redirect URI for your application
- Request OAuth tokens: Use the authorization code flow to get access and refresh tokens
API Endpoints
| Environment | Endpoint | Use Case |
|---|---|---|
| Production | https://api.ads.microsoft.com | Live advertising data |
| Sandbox | https://api.sandbox.ads.microsoft.com | Testing & development |
Client Libraries
Microsoft provides SDKs for multiple languages:
- Python: `bingads` package on PyPI
- PHP: `bingads-php-sdk` on Packagist
- Java: `bingads-java-sdk` on Maven
- C#: NuGet package `Microsoft.BingAds.SDK
Common API Operations
- Campaign management (create, update, delete)
- Bulk operations (download/upload campaigns)
- Reporting (performance, search terms, etc.)
- Audience management (customer lists)
- Conversion tracking (offline conversions)
Related: For Google Ads API integration, see our Google Ads API Guide. For Bing Ads audience upload via API, check Bing Ads Audience Upload.