title | ms.service | ms.topic | author | ms.author | description |
---|---|---|---|---|---|
Authentication with OAuth |
bing-ads |
article |
jonmeyers |
jonmeyers |
Authenticate for Bing Ads API using OAuth. |
[!INCLUDErequest-header]
Consider the user that you want to sign in e.g., example@contoso.com. The Bing Ads API will not accept that email address and password. Instead you need to set the AuthenticationToken header element that contains a user access token. You can think of an access token as representing a user name and password.
How can you get an access token for a user? As an application developer you'll use a Microsoft authorization URL to prompt the Microsoft Advertising user for consent. Once a user provides consent, you can get an access token and act on behalf of the user.
Microsoft Advertising leverages the Microsoft identity platform endpoint for developers and the OAuth 2.0 protocol to authenticate work or school accounts from Azure Active Directory (AAD) and personal Microsoft accounts (MSA), such as hotmail.com, outlook.com, and msn.com.
-
Request user consent for your application to manage their Microsoft Advertising accounts
Tip
For details about how to get access and refresh tokens using the Bing Ads SDKs, see Authentication With the SDKs.
[!div class="nextstepaction"] Register an application