microsoftdocs / advertising-docs Goto Github PK
View Code? Open in Web Editor NEWLicense: Creative Commons Attribution 4.0 International
License: Creative Commons Attribution 4.0 International
'Cannot set the Start or End Date of Ad Rotation feature for the ad group.'
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi guys,
I've done all steps as it's described in this article - https://docs.microsoft.com/en-us/bingads/guides/walkthrough-desktop-application-php?view=bingads-12
As a result, refresh token was written to refresh.txt file but I got error -
Fault Code: s:Server Fault String: Invalid client data. Check the SOAP fault details for more information Fault Detail: object(stdClass)#28 (1) { ["AdApiFaultDetail"]=> object(stdClass)#29 (2) { ["TrackingId"]=> string(36) "fd3e2a21-c7df-40b6-8d1a-670279b436bd" ["Errors"]=> object(stdClass)#30 (1) { ["AdApiError"]=> object(stdClass)#31 (4) { ["Code"]=> string(3) "105" ["Detail"]=> NULL ["ErrorCode"]=> string(18) "InvalidCredentials" ["Message"]=> string(89) "Authentication failed. Either supplied credentials are invalid or the account is inactive" } } } } -----
InvalidCredentialsAuthentication failed. Either supplied credentials are invalid or the account is inactive
What seems to be the problem? How can I fix this?
Best regards,
Dmitry
It would help massively not to guess/test which error codes which individual service operations can return.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Where can I find information about API call limits? I'm getting the following error:
AdApiError Code: 117 Error Code: CallRateExceeded Message: You have exceeded the number of calls that you are allowed to make in a minute. Please reduce the number of calls that you make per minute.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Looking forward to the PHP version of this example. :)
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi, I think the code in many cases is unnecessarily verbose. For example the function output_webfault_errors() could be written without repeating the same code blocks:
error_types = (
["ApiFault", "OperationErrors", "OperationError"],
["ApiFaultDetail", "Errors", "AdApiError"],
["ApiFaultDetail", "BatchErrors", "BatchError"],
["EditorialApiFaultDetail", "EditorialErrors", "EditorialError"],
["EditorialApiFaultDetail", "OperationErrors", "OperationError"],
["ExceptionDetail"],
)
def handle_error(detail, fields):
api_errors = detail
for field in fields:
api_errors = getattr(api_errors, field, None)
if api_errors is not None:
if isinstance(api_errors, list):
for api_error in api_errors:
output_bing_ads_webfault_error(api_error)
else:
output_bing_ads_webfault_error(api_errors)
return True
return False
def output_webfault_errors(ex):
if not hasattr(ex.fault, "detail"):
raise Exception("Unknown WebFault")
for et in error_types:
if handle_error(ex.fault.detail, et):
return
raise Exception("Unknown WebFault")
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Heya, are the create application steps out of date? The screenshot shows "converged applications" but I just have "my applications". Maybe I need to create more different types of applications to get that screen?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thank you for the list of report timezones.
Can you please provide a map to the standard tz database names? It is time-consuming and error-prone to do this manually.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The table at the bottom of the page is just displaying as text.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The python examples for this doc are for version 11.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://content.api.bingads.microsoft.com/shopping/v9.1/bmc/***/products/batch
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I am having problems getting an initial setup working. The ClientSecret field from AuthHelper is not used at all. Even If I delete it, the code doesn't crash. Also there are several missing informations, like how to obtain a ClientId and how to obtain a ClientSecret.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi Eric and team, It would be helpful if you could recommend which of these to start with. As a newbie I am just looking for guidance to get me started. Just providing a long list with explanations of samples isn't sufficient - they all look the same to me - maybe you could just add "recommended starting sample" to the one you think is the best place to start. Thanks
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
One gotcha to watch out for is to make sure your registered application is configured to support the "native application" platform. :)
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The above described auto-approval of a sandbox store does not appear to work. My store was rejected a few hours after first being created. I had to contact support to have them manually approve it. Please update the documentation or auto-approval process. Thanks.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
after user allowed the permissions while authentication, I got the access token and refresh token. Then I tried to get the user details like id using GetUserAsync call, but it is not responding for a long time..
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
sizes
<size> The available size of the product. The size value is user-defined but should be based on your target country.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
When downloading a GeographicPerformanceReport, it will contain geo targets that are not available in the list of geo targets provided through the API, although this is not stated anywhere in the docs.
For example, our report contains the State La Paz
with location ID 645. This location is not available in that list of targets. This makes it impossible to map them to the actual targets in our database.
Please clarify if them missing is intended, and if so, how we would go forward in properly mapping these targets.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Where does the function authenticate come from? do I really need to look through all the files to find it ? why asterisk imports? Links to auth_helper and customermanagement_example_helper would be helpful
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
In order to get this to compile with .Net 4.5 in Visual Studio 2013 on Server 2008R2 I had to
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Frankly I saw a place I can put in my id.
private static string _clientId = "<clientidgoeshere>";
But where to put in the password?
Authenticating should have password. I am looking for a code to enter the username and password without any pop up.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Bing Ads account:
When I copied and pasted above link, I got this error:
We're unable to complete your request
Microsoft account is experiencing technical problems. Please try again later.
This is hard to follow on MacOS using the dotnet command line tool and Visual Studio Code.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
How can set more than one location in an only request call?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
the code doesn't compile and when we change the type to match the API it fail with error code 109 token expired
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hello everyone,
I would like to include a date-column into my report, but unfortunately there is no valid request value "Date" I can request.
At some point I definately need to request historic data, such that a simple daily update in postprocessing is not possible.
Is there a way around this? I apprechiate any help.
currently my output looks like this, and I simply want another column named date:
"Report Name: My Keyword Performance Report"
"Report Time: 8/27/2018"
"Time Zone: (GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna"
"Last Completed Available Day: 8/28/2018 2:05:00 PM (GMT)"
"Last Completed Available Hour: 8/28/2018 2:05:00 PM (GMT)"
"Report Aggregation: Daily"
"Report Filter: "
"Potential Incomplete Data: true"
"Rows: 3"
"AccountNumber","AccountId","CampaignId","DeviceType","Revenue","Impressions","Clicks","Spend","AverageCpc","Conversions"
"","","","Computer","0.00","2","1","0.03","0.03","0"
"","","","Computer","0.00","1","0","0.00","0.00","0"
"","","***","Computer","0.00","1","0","0.00","0.00","0"
"©2018 Microsoft Corporation. All rights reserved. "
Thanks Tobi
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This all feels a bit too much like starting in the deep end. Is there a very basic hello world example you can show? e.g.
include these libraries
this is how you auth with dev token and sandbox
this is a command to get a list of your bing ads campaigns
print the list of campaigns
that's it :)
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
What happens when you don't specify a ReportTimeZone
when submitting a ReportRequest
?
It sounds like this is a new optional specification we can use, but there is no description of what the default behavior is if no time zone is specified. I also did not find anything on this when looking at the docs for the ReportTimeZone
object.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I did obtained a DeveloperToken, changed Env to Production, have obtained an application id and added Native app to the app, saved the page, and used the app-id as ClientId in PHP, no ClientSecret as not sure what is that. Getting this error.
$ php ReportRequests.php
You need to provide consent for the application to access your Bing Ads accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Bing Ads
account:
https://login.live.com/oauth20_authorize.srf?scope=bingads.manage&client_id=<EDITED>&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf
After you have granted consent in the web browser for the application to access your Bing Ads accounts, please enter the response URI that includes the authorization 'code' parameter:
https://login.live.com/oauth20_desktop.srf?code=<EDITED>&lc=1033
Error: invalid_client
Description: The provided request must include a 'client_secret' input parameter.
You need to provide consent for the application to access your Bing Ads accounts. Copy and paste this authorization endpoint into a web browser and sign in with a Microsoft account with access to a Bing Ads
account:
https://login.live.com/oauth20_authorize.srf?scope=bingads.manage&client_id=<EDITED>&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf
After you have granted consent in the web browser for the application to access your Bing Ads accounts, please enter the response URI that includes the authorization 'code' parameter:
https://login.live.com/oauth20_desktop.srf?code=M<EDITED>&lc=1033
0
#0 U:\fls_warehouse\bigquery\vendor\microsoft\bingads\src\Auth\OAuthWithAuthorizationCode.php(110): Microsoft\BingAds\Auth\LiveComOAuthService->GetAccessTokens(Object(Microsoft\BingAds\Auth\OAuthRequestParam
eters), 'Production')
#1 U:\fls_warehouse\bigquery\bingads\AuthHelper.php(165): Microsoft\BingAds\Auth\OAuthWithAuthorizationCode->RequestOAuthTokensByResponseUri('https://login.l...')
#2 U:\fls_warehouse\bigquery\bingads\AuthHelper.php(150): Microsoft\BingAds\Samples\V12\AuthHelper::RequestUserConsent()
#3 U:\fls_warehouse\bigquery\bingads\AuthHelper.php(78): Microsoft\BingAds\Samples\V12\AuthHelper::AuthenticateWithOAuth()
#4 U:\fls_warehouse\bigquery\bingads\ReportRequests.php(58): Microsoft\BingAds\Samples\V12\AuthHelper::Authenticate()
#5 {main}
Have tried on two PHP versions, even in Windows PHP and on Ubuntu PHP.
$ php -vPHP 5.6.25 (cli) (built: Aug 18 2016 11:39:15)
Copyright (c) 1997-2016 The PHP Group
and
# php -v
PHP 7.2.7-0ubuntu0.18.04.2 (cli) (built: Jul 4 2018 16:55:24) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.7-0ubuntu0.18.04.2, Copyright (c) 1999-2018, by Zend Technologies
composer.json
{
"require": {
"microsoft/bingads": "v0.11.12.5"
}
}
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Path1 and Path2 allows 52 characters, contradicting the documentation which is stating 50. For example, I can save this in Path1 and Path2 and received them calling the APIs:
{=COUNTDOWN("2019/02/17 00:00:00","en-US",3)} sabat"
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This may be a product bug since it's described as enumeration values in some cases https://github.com/MicrosoftDocs/BingAds-docs/search?q=fourty&unscoped_q=fourty
There's no point in having a link on a page that links to itself is there? "The Authorization Data class contains.." just links to the same anchor point... I was actually expecting that link to go to a page which explained all the different types of Authentication properties you could use. Am looking for the one to use if not using Oauth but just want to use my own developer id to access my own bing ads site directly.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
cannot get statistics in getStats
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
When will the v12 SDKs officially be pushed to GitHub? Currently v11.5.9 is listed as the most recent version for each language of the SDKs.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
.forDateRange() in the final row of the table is not in monospaced font.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
There's a commented out example above:
// Alternatively you can request data for a subset of campaigns or ad groups.
//Scope = new AccountThroughAdGroupReportScope
//{
// AccountIds = null,
// Campaigns = new[] {
// new AdGroupReportScope
// {
// AccountId = accountId,
// CampaignId = <YourCampaignIdGoesHere>,
// AdGroupId = <YourAdGroupIdGoesHere>
// }
// }
//},
However an AdGroupReportScope cannot be assigned to Campaigns.. this should be CampaignReportScope.
Thanks!
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The example doesn't build without ExampleBase from BingAdsExamplesLibrary.V11. https://github.com/BingAds/BingAds-dotNet-SDK/blob/master/examples/BingAdsExamples/BingAdsExamplesLibrary/ExampleBase.cs
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
It would be really useful here to have a Getting started path that just used the Developer Token to query Bing Ads API. I'm trying to use the Management Model for Direct Advertisers so an Oauth walkthrough is of limited use.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Please can you add a filter to this page so I can filter just the samples that have PHP examples. Saves me having to click into each to find out if there is a PHP version.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
This issue is based around the following file: https://github.com/MicrosoftDocs/BingAds-docs/blob/master/BingAds/bingads-12/guides/sandbox.md.
Within the above file, there's a paragraph which is as follows:
The above steps create a Bing Ads legacy user name that is not supported from Bing Ads API version 12 onwards. To use OAuth in sandbox, you need a sandbox Microsoft account (MSA). To get an MSA that you can use in sandbox, you need to invite a user to work on your account. The following steps show how to invite a user to work on your account.
It then goes on to say you need to invite a new user into the Bing Ads account, however, what it doesn't state is whether this should be done on a sandbox Bing Ads, or a production one.
If it's sandbox, which would make sense, are you meant to make a new Bing Ads account first so you're able to import users into that?
I've tried doing this with a production account, by inviting an account with an @outlook.com
email address, follow the steps about clicking the link & create a new email address, using @outlook-int.com
however, later on in the registration process it ask's me to verify the code sent to the email (Ending in @outlook-int.com
), however, I don't have access to this account so i'm never able to verify / complete the process.
Please could you advise / update your documentation to make this stage a little clearer.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Is says (correctly) that CountryCode should be a 2 character country code. But instead of referring to a list of country codes, it gives this link: https://docs.microsoft.com/en-us/bingads/guides/geographical-location-codes?view=bingads-11, which is something completely different.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
According to the docs here on LabelIds
in the request body:
If the list of label identifiers is null or empty then all label associations for the account will be returned page by page.
However, if an ID is not included, then this results in an error code 514 with the message:
Ids passed are null or empty.
So it would seem that the field is actually required, contrary to what the documentation currently states.
Would you please update the documentation to reflect the correct usage of the API, or open an issue to fix the API to return the documented response.
Thanks!
---
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi,
how is it possible that in some accounts the report request doesn't response the user location report URL and others give it?
Thanks
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I have been looking around and end up on this page, but I am unable to find the actual csv file that I can download (manually, not through API), and take a look at the Geo Locations. Where can I download the csv?
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Did the target framework upgrade as well? Not seeing any mention of this, but we are on version 4.5.2 and I get an error when trying to update through NuGet -
"Could not install package 'System.Configuration.ConfigurationManager 4.4.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi! I've been attempting to shift a legacy service from Bing Ads V11 -> V12 and I've run into difficulties generating the authentication token after registering our application. In particular since we are making a Web API and not a Web or Native app I am not sure what to enter as the redirect_uri
parameter here:
https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&scope=bingads.manage&response_type=code&redirect_uri=REDIRECTURI&state=ClientStateGoesHere
Thanks!
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
As of May 1, 2018, the Required Columns section of this page is incorrect, based on my testing. You'll need to include DynamicAdTarget in your request.
I'm not sure if there are other undocumented required columns since I stopped testing when I got my download to work by adding DynamicAdTarget to the columns I requested.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I am trying to connect to Bing Ads data by using python in a jupyter notebook. After a day I still haven't connected. I have a production token but I run into a dead end when requesting user consent.
I am redirected to the follwoing error message:
https://login.live.com/err.srf?lc=1043#error=invalid_request&error_description=
The+provided+value+for+the+input+parameter+'redirect_uri'+is+not+valid.+The+expected+value+is+'https://login.live.com/oauth20_desktop.srf'+or+a+URL+which+matches+the+redirect+URI+registered+for+this+client+application.
My application obvioulsy doesn't have a "redirect URI" because I am just working from my notebook, so I can not set that.
It would be a very nice improvement of the documentation if you could add some basic simple examples to get started.
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.