> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/marketing/bing-ads.md).

# Bing Ads

### Connecting to Bing Ads

You need to register a Bing Ads account, get a developer token, and authenticate using OAuth to connect to the Bing Ads APIs.

### Register a Bing Ads Account

Complete the following steps to sign up for a Bing Ads account and obtain the CustomerId and (optional) AccountId:

1. Sign up for a Bing Ads account in the [Bing Ads Web application](https://ads.microsoft.com/Default.aspx) or at the [Sandbox Site](https://secure.sandbox.bingads.microsoft.com/) for a sandbox account.
2. Select **Settings > Accounts and Billing** and select a single account. The AccountId and CustomerId (cid) are displayed on the account's page and in the page's URL.

### Get a Developer Token

To use the Bing Ads APIs, you must have a DeveloperToken in addition to the CustomerId. You must have the Super Admin role in Bing Ads to create a developer token, though you do not need special permissions to use the token.

1. Log in at the [Bing Ads Developer Portal](https://developers.ads.microsoft.com/Account) as a Microsoft Account user with the Bing Ads Super Admin role.
2. Click **Request Token** and take note of your developer token. You will set it in the DeveloperToken connection property.

### Authenticate via OAuth Authentication

The Bing Ads APIs use the OAuth 2 standard.&#x20;

1. If you have not done so already, sign up for a Bing Ads account in the [Bing Ads Web application](https://ads.microsoft.com/Default.aspx) or at the [Sandbox Site](https://secure.sandbox.bingads.microsoft.com/) for a sandbox account.
2. Go to the [Azure portal](https://portal.azure.com) ([Azure test portal](https://df.onecloud.azure-test.net) for sandbox accounts), and login with your Microsoft Account credentials when prompted.
3. Under Azure Active Directory --> App registrations, click New registration.
4. Provide the application name and select an appropriate Supported account type. Not selecting to allow personal Microsoft accounts will prevent users with personal accounts from authenticating.
5. &#x20;Set the Redirect URI to the page in your Web application where you would like users to be redirected with the OAuthVerifier
6. Register your application and take note of your Application (client) Id. You will use it as the OAuthClientId value in the OAuth grant flow.
7. In the Certificates & secrets section, click New client secret to generate a client secret and take note of the resulting value. You will use it as the OAuthClientSecret value.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appstrategy.com/apprules-r-documentation/platform/platform-features/system-settings/data-sources/connection-settings/marketing/bing-ads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
