Welcome to the Taboola Backstage API documentation. You'll find comprehensive guides and examples to help you get started with Taboola Backstage API quickly.
How can we calculate thru the api the cost per click by publisher and time of the day? we need an estimate for live traffic and the real cost for updated data Where can I find more information on how this works
Posted by Mansour Bennouna 8 days ago
Hi, I´m trying to connect to TAboola APi via oAuth to google sheets, I have de credencials but when I log in in the account, I´m not redirect back to the google sheets. Example of the request: "https://authentication.taboola.com/authentication/login?grant_type=authorization_code&response_type=code&redirect_uri=https%3A%2F%2Fbackstage.taboola.com%2Fbackstage%2Fauthenticate%2Flogin&client_id=xxxxredir=https%3A%2F%2Fscript.google.com%2Fmacros%2Fd%2F12COOkin8nod....." Does this domain script.google.com need to be white listed by Taboola? Best.
Posted by Guilherme Malta 15 days ago
Hi, For our requirements, in each account I need the last 24 hours' spend per Publisher. With the Java SDK, I can easily get the spend per site in daily chunks using the **SITE_BREAKDOWN** dimension, however this doesn't support anything finer-grained, for instance if I want to know the spend from midday yesterday until midday today. It doesn't look possible through the Java SDK. I've also looked at calling the Backstage API directly, but even then it looks like I can only perform what I need one site per call using **campaign_hour_breakdown** with a site filter... ``` https://backstage.taboola.com/backstage/api/1.0/<account>/reports/campaign-summary/dimensions/campaign_hour_breakdown?start_date=2021-02-08&end_date=2021-02-09&site=<site name> ``` Our app can then aggregate the values in the response to calculate our spend on a site for the last 24 hours. Given that we are using thousands of Publishers, this could take some time! I'd love to know if there another more performant way of doing this? Cheers, Colin
Posted by Colin MacLean 21 days ago
I'm trying to toggle a campaign item's active status, however it returns with a 400 error: ``` Exception in thread "main" com.taboola.backstage.exceptions.BackstageAPIRequestException: Failed to perform API call with response code [400]. Response payload status [400], message [Unknown field name 'active'], offending field [null], message code [api.action.bad_request.null] at com.taboola.backstage.internal.SynchronousCallAdapterFactory$1.adapt(SynchronousCallAdapterFactory.java:70) at retrofit2.HttpServiceMethod$CallAdapted.adapt(HttpServiceMethod.java:165) at retrofit2.HttpServiceMethod.invoke(HttpServiceMethod.java:146) at retrofit2.Retrofit$1.invoke(Retrofit.java:160) at com.sun.proxy.$Proxy3.updateItem(Unknown Source) at com.taboola.backstage.services.CampaignItemsServiceImpl.updateItem(CampaignItemsServiceImpl.java:87) ``` My code is pretty simple (vars spoofed)... ``` Backstage backstage = Backstage.builder().build(); String accountName = "account123456"; String campaignId = "123456"; String itemId = "987654321"; CampaignItem item = backstage.campaignItemsService().readItem(clientAuth, accountName, campaignId, itemId); logger.info("ID:{} active:{} status:{} name:{}", item.getId(), item.getActive(), item.getStatus(), item.getTitle()); // Update status to opposite CampaignItemOperation operation = CampaignItemOperation.create().setActive(!item.getActive()); CampaignItem updatedItem = backstage.campaignItemsService().updateItem(clientAuth, accountName, campaignId, itemId, operation); ``` The code fails on the last line, with the above exception. Any ideas what I'm doing wrong? As you can see, I'm able to retrieve the Campaign Item just not update its active value.
Posted by Colin MacLean 27 days ago
Hi I am starting to work with the api. After fetching the access token I am trying to get all campaigns (as listed here https://developers.taboola.com/backstage-api/reference#fetching-campaigns) but I am getting an empty array result. Please advise.
Posted by David Baruch about a month ago
When duplicating a campaign from an account A to account B after 6pm EST fails with "Start Date cannot be set in the past" error. The POST endpoint with JSON body is attached below : ------------------------------------------------------------------ https://backstage.taboola.com/backstage/api/1.0/{account_A}/campaigns/{campaignId}/duplicate?destination_account={account_B} {'tracking_code': 'parameter=1234', 'branding_text': 'Search', 'spending_limit': 40, 'name': 'this_is_the_campaign_name', 'daily_cap': 20, 'platform_targeting': {'type': 'INCLUDE', 'value': ['DESK']}, 'cpc': 0.5, 'country_targeting': {'type': 'INCLUDE', 'value': ['US']}, 'spending_limit_model': 'MONTHLY', 'marketing_objective': 'DRIVE_WEBSITE_TRAFFIC'} ------------------------------------------------------------------ Any recommendation on how to be able to duplicate without start date error?
Posted by Melody Song about a month ago
We are looking to create campaigns via the API and have run into an issue with the API documentation. https://developers.taboola.com/backstage-api/reference#create-a-campaign We would like to be able to set the advertiser ID for the campaign during the creation process, but there appears to be no field listed for it. The call would be to https://backstage.taboola.com/backstage/api/1.0/account_id/campaigns/ but I suspect we have to use our main account ID in that URL. then later provide the advertiser ID that lives within our account? It would be awesome if the documentation could be updated at some point to mention things like this, as there are a lot of blind spots in what it covers. Under "Campaign Fields" there is advertiser_id but it is listed as read-only. Also, is there an API call that will return all advertiser IDs for an account? Thanks! /Chris
Posted by Chris Ellerby about a month ago
Hi there, where/how can we add the redirect URIs to the whitelist? The account manager asked us to ask you here. Also is it possible to get credentials that are not tied to an advertiser, so that we can properly utilize the code authorization flow? Thank you.
Posted by Nils about a month ago
Hello, My name is Moosa Nayeem. I work for TapClick's on the data integration team. I am reaching out regarding an issue reported by one of our mutual clients Recrue Media. The client has provided a set of creds which they have mentioned are valid credentials confirmed by Taboola. However, we see the API call failing for those credentials. API Response: RESPONSE:* error":"invalid_client","error_description":"Bad client credentials"} Thoughts?
Posted by Moosa Nayeem Mohammed 2 months ago
Are special characters scrubbed if passed into the placement variable? One of the string we pass into the placement variable contains ! in it. The reporting api endpoint passes that string back without !. Are there are characters that are scrubbed out? If so, why?
Posted by Carmen Ruder 2 months ago
Hello all. I have requested via email, several times, access to the API but no one is responding to me. Does anyone know a method I could use in order to get my client_id and client_secret so I can gain access to the API? Thanks in advance.
Posted by Chris 2 months ago
Hello. A cording to docs hours are in 0-24 range, inclusive, 'from' must be smaller then 'to'. Its bit confusing: 0-0 does not work, so if 0-1 means 'first hour of the day' then 'to' is not inclusive. 0-24 does not work (25 hours if 'to' is inclusive) 0-23 works and so does 1-24 - both means 'whole day' because its 24 hours? Then, if I set 1-23. is 23 hours (not including the first hour of the day)? I think few examples can help because we can't have both hour 0 and hour 24 - at least not on this planet :) Thanks Misha
Posted by Misha Makarevsky 2 months ago
Our revenue data are provided on UTC timezone. To perform our analysis with our Taboola expenses we use the by_hour_of_day dimension to get expenses from day <d-1> 7pm to day <d> 6pm (Taboola uses ET timezone), details: 1/ To get expenses by campaign for day <d> "UTC", 2 requests: /reports/campaign-summary/dimensions/by_hour_of_day?campaign=<idCampaign>&start_date=<d>&end_date=<d> (we keep datas from 12am to 6pm) /reports/campaign-summary/dimensions/by_hour_of_day?campaign=<idCampaign>&start_date=<d-1>&end_date=<d-1> (we keep data from 7pm to 12am) 2/ To get expenses by site for day <d> "UTC": 2.a/ we get all idsite for day <d-1> and <d>: /reports/campaign-summary/dimensions/site_breakdown?campaign=<idCampaign>&start_date=<d>&end_date=<d> /reports/campaign-summary/dimensions/site_breakdown?campaign=<idCampaign>&start_date=<d-1>&end_date=<d-1> 2.b/ for each idsite: /reports/campaign-summary/dimensions/by_hour_of_day?site=<site_name>&campaign=<idCampaign>&start_date=<d>&end_date=<d> (we keep datas from 12am to 6pm) /reports/campaign-summary/dimensions/by_hour_of_day?site=<site_name>&campaign=<idCampaign>&start_date=<d-1>&end_date=<d-1> (we keep data from 7pm to 12am) -- But it doesn't work as expected, the total of expenses for an "UTC day" is far (always less) from our estimations (based on an average for few days). What is wrong? Thank you!
Posted by Peter 3 months ago
Hi, According to the Backstage API doc, there are only a number of available preset dimensions to pull a Campaign Summary Report. I am currently using 'campaign_site_day_breakdown'. I'm trying to get reporting data down to the creative/item level but none of them go down to that level. Is it possible to pull a report down to a creative/item level? Thanks, Ed
Posted by Edward Tan 3 months ago