Bing Ads API Oauth
Hello All,
Bing ads api has announced oauth feauture of authenticating the bing account as per this doc.
http://msdn.microsoft.com/en-US/library/dn277356%28v=msads.90%29.aspx
Now i have authenticated for some bing account and stored the access token and refresh token without passing username and password, however when i try to download the report via auth token i m getting this error
SubmitGenerateReport failed. AdApiFaultDetail exception encountered Tracking ID: 23d64268-59e4-447c-b009-6d2460acb1a4 Error encountered: Message: Authentication failed. Either supplied credentials are invalid or the account is inactive Detail: ErrorCode:
InvalidCredentials Code: 105 s:Server Invalid client data. Check the SOAP fault details for more information
Can you please look into this? If i pass the username and password and remove the token then it works fine, but without username and password i cannot download the report.
Thanks
Ronak Shah
Hello Dare Obasanjo,
Can you please tell me by when reporting will be supported for oauth, as we are planning to migrate our application to v9 and this oauth feauture can help us to grow our business, because most of advertisers dont like to share the bing username and password.
Please reply.
Thanks
Ronak Shah
All Bing Ads web services should support OAuth when v9 is generally available next month.
Similar Messages
-
When will OAuth be required for Bing Ads APIs (v9)
Hi,
What is the official date for when OAuth is required for the Bing Ads APIs? (We are using v9). We have a number of merchants to move over and need a date to track towards. I have heard June/July before, but would appreciate getting an exact date.
Thanks,
Hans
HKHello.
This example uses the UserName and Password elements for authentication. For
Managing User Authentication with OAuth, replace the
UserName and Password elements with the AuthenticationToken, which is your OAuth access token.
http://msdn.microsoft.com/en-US/library/bing-ads-reporting-request-and-download-a-keyword-performance-report-in-csharp.aspx
I hope this helps!
Hi Eric Urban,
I need the same help to get the keyword performance report using Java API. I have found java sample code having the userId and password.
As you suggested above user id and pwd will be replaced Authentication Token.
Can you please provide the java sample code to generate the Authentication Token, which will be refreshed/renewed automatically without manual inputs? Because our utility needs to be scheduled daily once and pulls the keyword performance report.
Thanks,
Regards,
Sreekanth. -
Trying to get a code walkthrough to work - Bing Ads Api C# Desktop App
Hi,
I'm trying to get the Bing Ads API Desktop App Walkthrough working. When I run it where it says to run, I get an error saying "Uri passed doesn't contain code param..."
All I've done to the copied and pasted code was input ClientId and DeveloperToken in the first part of the MainWindow class.
Do you have any idea what could be causing this?
https://msdn.microsoft.com/en-US/library/bing-ads-net-walkthrough-desktop-application.aspx
Thanks,
MikeI am able to repro the issue by using the ClientId of a web application.
The proposed solution is to register an application as a desktop or mobile application, in order to use that example. Running Fiddler you can capture the traffic e.g. as follows:
https://login.live.com/oauth20_desktop.srf?error=invalid_request&error_description=The%20provided%20value%20for%20the%20input%20parameter%20'redirect_uri'%20is%20not%20valid.%20The%20client%20application%20must%20be%20marked%20as%20'mobile'%2c%20or%20the%20value%20must%20be%20an%20absolute%20URL%20which%20matches%20the%20registered%20redirect%20URI.&lc=1033
It seems the 'Uri' error message is thrown by the SDK because it tries to get access and refresh tokens with the URL above instead of the expected on with 'code'. We will take a look at the SDK and make sure the right error message is being relayed.
By the way if you want to use a web application (as it sounds like you may have already registered one), try Walkthrough: Bing Ads Web Application in C#.
Please let me know if I can help with any other questions.
I hope this helps!
Eric -
Pull DELETED / REMOVED Campaign Data Via Bing Ads API?
Using Bing Ads API, is there a way to pull reports containing DELETED or REMOVED campaigns?
When I look at the Status column, the description says: The current delivery status.
For Bing Ads reporting purposes, it's really important and logical to allow users to pull DELETED campaign data because that data IS data that should be reported... not ignored simply because its status is deleted or removed.
Is there a way via the API to get not only current campaigns but also deleted campaigns?
When I pull the exact same report from the Bing Ads API, it DOES show me deleted campaign data.Deleted entities e.g. campaigns, ad groups, ads, and keywords, cannot be retrieved using the Campaign Management or Bulk services. You can get performance history for deleted campaigns using the Reporting service if there were any ad impressions during the
specified report time. For more information, seeGetting
Reports.
Please reach out with any further related questions. I hope this helps! -
Hello,
I can't seem to get any api calls to work. I am trying to post to the following url:
https://clientcenter.api.bingads.microsoft.com/Api/Billing/v9/CustomerBillingService.svc
the following xml
<s:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns="https://bingads.microsoft.com/Billing/v9">
<Action mustUnderstand="1">GetAccountMonthlySpend</Action>
<ApplicationToken i:nil="false"></ApplicationToken>
<AuthenticationToken i:nil="false">my auth token</AuthenticationToken>
<DeveloperToken i:nil="false">my developer token</DeveloperToken>
<Password i:nil="false">my password</Password>
<UserName i:nil="false">my email</UserName>
</s:Header>
<s:Body>
<GetAccountMonthlySpendRequest xmlns="https://bingads.microsoft.com/Billing/v9">
<AccountId>793477</AccountId>
<MonthYear>2015-02</MonthYear>
</GetAccountMonthlySpendRequest>
</s:Body>
</s:Envelope>
and I get the following error:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring
xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or
a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault></s:Body></s:Envelope>
Can you help me understand what I am doing wrong?
Thank you in advance,
ShawnHi Shawn.
I am not able to repro this issue. I copied and pasted your SOAP request into SoapUI, used my own credentials + AccountId, ran it, and the operation returned successfully. Not sure what to suggest other than to double check whether a different operation
might have thrown that error. Which programming language / environment are you using?
By the way, since you are using OAuth (AuthenticationToken header) you can remove UserName, Password, and ApplicationToken from the request headers. For more information see
MSDN:
f you specify UserName, Password,
and AuthenticationToken,
the UserName and Password are
not validated. Authentication would succeed or fail based solely on the value of the AuthenticationToken,
even if the UserName and Password represent
valid credentials.
Best regards,
Eric -
Trying to get a code walkthrough to work - Bing Ads Api C# Web App
Hi,
I'm trying to get the C# Web App code walkthrough to work. I went through the steps written out, and pasted in the Client ID, Client Secret, RedirectionUri, and DeveloperToken values. When I run the app, it sends me to the redirection URI, with
"?code=" and a 36-character code added onto the address. Could you tell me why this is happening, and what I might need to do to get this working?
Thanks,
MikeHi Mike.
The current example assumes that you set the RedirectionUri to index.chtml, which admittedly isn't robust enough. We plan to update it. Typically as you are probably attempting, the callback after the user provides credentials would redirect
to a page other than index.chtml e.g. callback.chtml.
Short term solution is that you can update the RedirectionUri to either "YourSite\" or "YourSite\index.chtml", and the existing sample should run. Otherwise you can define a new callback page that handles the "?code" fragment
e.g. as follows:
// If the current HTTP request is a callback from the Microsoft Account authorization server,
// use the current request url containing authorization code to request new access and refresh tokens
if (Request["code"] != null)
await authorization.RequestAccessAndRefreshTokensAsync(Request.Url);
// Save the authorization object in a session for future requests.
Session["auth"] = authorization;
return await CallBingAdsServices((OAuthWebAuthCodeGrant)Session["auth"]);
Does this help? Please let me know if you have any other questions.
Best regards,
Eric -
Bing Map API in Dreamweaver MX
How do I add a Bing Map API, or embed a Bing Map, in Dreamweaver MX?
http://blog.harakis.net/2009/06/18/putting-a-bing-map-on-your-website/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
Bing Search API exact phrase match not working?
Dear Microsoft support,
I have recently subscribed to the Bing Web Search API and now found a problem with exact phrase match.
When searching for "engineering it has over medical", encoded as %27%22engineering%20it%20has%20over%20medical%22%27 I get two results back from you - unfortunately on closer inspection neither one of them contains the phrase I searched for.
I could understand less results than actually exist due to a limited index, but this seems to be a bug.
Please check and let me know how to resolve this.
Thank you very much!
JohannesHi,
Thanks for your posting.
I try to search for "engineering it has over medical" in Bing Search API (Web), here is the expressed query url: https://api.datamarket.azure.com/Bing/Search/v1/Web?Query=%27engineering%20it%20has%20over%20medical%27,
it gives me a lot of data, so I don't think this is a bug, if I misunderstand, please feel free to let me know, if it proved to be a bug, I will report this issue.
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Retrieving a photo from Bing's APIs
how to search a photo via currant locations.
and search a image for currant places.
Search photo via current location in the sense? If you could elaborate the question bit more?
P.S: If you're looking for the Bing's Search API in order to search for images:
Bing Search API in Windows Phone
Happy Coding! -
I'm using Bing Search API
to search for some Images. I'm using free subscription, so I can use Bing Search for 5000 times.
How do I know that I exceed the limit? What will Bing do, when if I use this API more than 5000 times?Hello.
If you exceed your quota, the Bing Search API returns a 403 Forbidden error. You then have the option of upgrading to a higher level of service.
For more information, please see
Bing API FAQ.
Best regards,
Eric -
Is there any licenses or such policies on BING AutoSuggest API?
Is there any licenses or such policies on Bing AutoSuggest API
in the case of commercial use?
・Bing AutoSuggest API
http://api.bing.com/osjson.aspx?market=ja-JP&query=keywordHi Tomohiko,
That API is undocumented and unsupported and not recommended for use for 3rd parties. Information on Bing's supported API's can be found here:
http://www.bing.com/dev/en-us/dev-center.
Thanks,
Elizabeth
Bing -
Missing large number of results through Bing Search API (web results only)
When making multiple calls to the Bing Web Search API (with a different $skip parameter), many queries I try seem to be missing many of the result I'd expect.
For example, searching for the string 'obama' on bing.com shows 107,000,000 results available.
When I search using the web search API using:
https://api.datamarket.azure.com/Bing/SearchWeb/v1/Web?Query=%27obama%27&%24format=json
I get 50 results, and the '__next' parameter is given as 'https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/v1/Web?Query='obama'&$skip=50'
If I repeat this several times, eventually I get a response with less than 50 results, and no '__next' parameter, indicating there are no more results.
However, I always get far fewer than 1000 results (I'd expect there to be at least 1000). Trying to get 1000 results (by making a request and querying against the '__next' URL), I get different numbers of results each time:
attempt 1: 355 results
attempt 2: 441 results
attempt 3: 358 results
attempt 4: 692 results
attempt 5: 692 results
attempt 6: 694 results
attempt 7: 659 results
Querying for this should always return at least 1000 results, since 'obama' has 107,000,000 results listed when searching from bing.com
Any idea what's going on here?Sorry to respond to this old thread, but the problem persists. It exists in both the web UI and the API. The initial result page (on the web) or result object (in the API) report millions of search results, however after clicking through a number of result
pages (on the web) the total number is reduced to a few hundred. Similarly, in the API, setting the '$skip' parameter above this number does not return results. In the Obama case the first page shows 18.2 million results (http://www.bing.com/search?q=obama&go=Submit+Query&qs=bs&form=QBRE)
but from page 35 and over only 529 results are reported (e.g., http://www.bing.com/search?q=obama&qs=n&pq=obama&sc=8-3&sp=-1&sk=&ghc=1&cvid=92729d6076e24a37a9e6ee099da99a4a&first=527&FORM=PERE7). Therefore the above problem
does not seem to be related to the difference between the API and the web UI, but rather that Bing does not provide any results from a certain point (presumably because nobody is interested in them anyway). However, for data mining/web content analysis it
is desired to get all results, even uninteresting ones. Is this behaviour documented somewhere, or can it be influenced? -
Want a JSON response by the Bing Synonyms API
Hello,
How do I request for a JSON response from the synonyms API. I could not find the answer in the documentation found here: https://onedrive.live.com/view.aspx?resid=23DD320B9FC9364A!113&app=Word&authkey=!AAxXlP949CZOQyA
I decided to try query param format=json and it did not work, neither did it work if I passed in the Content-Type: application/json
Everytime the API sends back the response in XML.
Please let me know,
AJWhat I could get from the documentation is basically:
A request to the HTTP endpoint consists of an HTTP GET request to the appropriate URI. There are two
URIs, one for XML results and one for JSON results. These are http://api.bing.com/xml.aspx and
http://api.bing.net/json.aspx, respectively.
Now the synonyms API URL is:
https://api.datamarket.azure.com/Bing/Synonyms/GetSynonyms?Query=%27word%27
what I am supposed to do here? -
Hi,
I have the next problem:
Everything works just fine when i query:
'https://api.datamarket.azure.com/Bing/Search/v1/News?Query=%27teamnet%27&Market=%27en-US%27'.
But, when i add sort by date option, and query this:
'https://api.datamarket.azure.com/Bing/Search/v1/News?Query=%27teamnet%27&Market=%27en-US%27&NewsSortBy=%27Date%27'
It's empty data, can someone help please?
And another question, it's possible to query with a since parameter ? Or something like that.
Thank you!This forum is for the speech service. You should use the search forum for this question.
-
How to get bing ads on skype?
How to get my bing PPC ads on skype by display network? Can anyone help on this
Solved!
Go to Solution.Hi and welcome to the Skype Community,
Sorry, but I don't quite understand what you mean. What are "Bing PPC ads"?
If you are aksing for how to run ads on Skype please take a look here: http://advertising.microsoft.com/en/skype
Follow the latest Skype Community News
↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓
Maybe you are looking for
-
Call the document Approval Workflow screen from a custom KM Details Page
Hi, We are trying to call the Approval Workflow screen from a custom developed KM Details page (using JSPDynpage). How can this event be triggered. We want to trigger the same event that gets called when a user clicks on the Approval Option under Set
-
When i buy a app it won't finish downloading
When i buy a app it says installing but when i go to lanch pad it wont ever finish downloading heres a pick its in top right its bean like that for 3 days and yes i have wifi
-
Folks - this might be a VERY simple question, but here goes. We have been trying to confirm the userid length available in ECC6/etc. Knowing that this has been constrained in previous releases to a shorter field length, i.e.?12? chars...we want to be
-
@jc:sql statements
hi. i had a question regarding return values of sql statements: i'm familiar with mapping return values from a SELECT statement into ResultSet objects, but what is returned when an INSERT or DELETE or UPDATE statement is performed? thanks. qin_23
-
Hi, Its possible to find the login time of a session... But is it possible to find exact execution time of a particular SQL in a session...? Thanks, Kr