Community Discussion
Get All Campaigns Returns Empty List
I sent a GET request to "https://backstage.taboola.com/backstage/api/1.0/<account_id>/campaigns/" with my access_token in the header. I get the following response:
```
data: {
results: [],
metadata: { total: 0, count: 0, static_fields: [], static_total_fields: [] }
}
```
From this old github issue (https://github.com/singer-io/tap-taboola/issues/1) I found on the deprecated Backstage API docs (https://github.com/taboola/Backstage-API) says that:
```
Reading, creating or updating Campaigns is only possible when the [account-id] references an Account with ADVERTISER in its partner_types field. Trying to send a request with a non-Advertiser Account will result in a 404 Not Found response.
```
I checked, my<account_id> does not have "ADVERTISER" in its `partner_types`.
I did not see any mention of this issue regarding `partner_types` in the current documentation. Could anyone confirm if "ADVERTISER" really is required to access Campaigns? Thank you.
Posted by Andy Shih almost 4 years ago
Taboola API Testing Sandbox Environment
Hello,
I was curious if Taboola has a Sandobox environment to test API calls. Just so I don't have to use my production account all the time.
Thank you,
Surya
Posted by Gokul C over 3 years ago
Blocking is not reflecting on backstage
When blocking a publisher from the Backstage platform, the change is immediately reflected in the campaign publisher_targeting object via the API.
But when updating this object (publisher_targeting) via the API, the change is not reflected in the Backstage platform - even after a page refresh.
This is the call we make to block publishers:
patch: https://backstage.taboola.com/backstage/api/1.0/[redacted]/campaigns/5602922
Payload: {"patch_operation": "ADD", "publisher_targeting": {"publishers": ["lemaleadmachine-tipsandtricks"]}}
Could that be a UI cache on the Backstage platform? Or are we missing something?
Posted by Igor over 3 years ago
Is there a way to get hourly statistic for a specific campaign via API?
We need to have an ability to get hourly statistic for specific campaigns. There is such an ability on the UI (https://i.imgur.com/LSP2LyO.png), but we did`t find a way to get this statistic via the API (https://i.imgur.com/R3rEqZS.png).
Please let us know whether we can retrieve hourly statistic for a specific campaign via the API?
Posted by Alex Kolesnykov about 4 years ago
Reporting issue with 'campaign_breakdown'
Hi,
We are requesting for this report (reports/campaign-summary/dimensions/campaign_breakdown) several times a day.
We request it for 2 time periods:
- 1 day
- 365 days (to get campaign lifetime spend)
I suspect that sometimes, depending on how long it took to respond, the response is not full.
It happens randomly when we try to parse the response to json and it fails:
`ValueError: Unterminated string starting at: line 1 column 25130053 (char 25130052)`
`ValueError: Unterminated string starting at: line 1 column 44233078 (char 44233077)`
This suggests the response is incomplete.
And indeed, catching the response itself when this happens shows HTTP200 but the response itself is not complete:
"..."conversions_value":0.00,"roas":0.00,"ctr":0E-18,"vctr":0E-18,"cpm":0.00,"vcpm":0.00,"cpc":0.00,"campaigns_num":1,"cpa":0.00,"cpa_actions_nu"
I do not think this is a timeout from our end as we wait for 360 seconds and the error happens much sooner than that.
So I suspect your server cut the response if it happens to take to long, and then I get a partial response.
Please advise on how to get this solved...
Perhaps there is a way to cut the report to chunks (paged report) or perhaps selecting which dimensions will be returned? (i only want the spend in this case).
example request that just failed:
GET 'https://backstage.taboola.com/backstage/api/1.0/samyonetwork/reports/campaign-summary/dimensions/campaign_breakdown?start_date=2019-05-27&end_date=2020-05-26'
response headers:
{'X-Timer': 'S1590508558.250668,VS0,VE5509', 'X-XSS-Protection': '1; mode=block', 'X-Cache': 'MISS', 'X-Content-Type-Options': 'nosniff, nosniff', 'transfer-encoding': 'chunked', 'Accept-Ranges': 'bytes', 'Expires': '0', 'Vary': 'Accept-Encoding', 'X-Served-By': 'cache-bwi5053-BWI', 'Server': 'nginx', 'Connection': 'keep-alive', 'Via': '1.1 varnish', 'X-Cache-Hits': '0', 'Pragma': 'no-cache', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Date': 'Tue, 26 May 2020 15:56:03 GMT', 'P3P': 'policyref="http://trc.taboola.com/p3p.xml", CP="NOI DSP COR LAW NID CURa ADMa DEVa PSAa PSDa OUR BUS IND UNI COM NAV INT DEM"', 'Content-Type': 'application/json;charset=utf-8', 'X-Frame-Options': 'DENY'}
Posted by Or almost 4 years ago
cpc calculation
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 about 3 years ago
Exclude site limitation
Hi Guys,
We are using a Rule tool (through the API) and it seems that it's having difficulties to exclude sites from campaigns that have a total exclusion of 1,500 sites from both account + campaign level. we do manage to exclude manually, however, the API getting an error. after discussing our Taboola AM, we understnad that we are limited with 1,500 (from the campaign level) + 1,500 (from the account level).
For example, on the below campaign we didn't reach our limitation and our API tool is getting error when it try to exclude any other site:
Campaign ID: 6436943
Campaign Name: Taboola_Bras_Mob_US_144181212_iOS_RON_TN
Blocked on Account Level: 1255
Blocked for this Campaign: 563
any suggestion what could be the problem when we are trying to exclude through API?
Posted by Nissim Duek over 3 years ago
is there any way to replace all users in an exisiting audience by api?
I need to update my audience every X hours.
I don't know the previous users that was on the list.
I just need a way to send a new list of users and replace the whole exisiting users inside audience.
is there any way to do that or I must have the previous users?
thanks
Posted by Yossi over 1 year ago
How to use your {cpc} macro
Hi Taboola team,
We want to use your {cpc} macro to get the cost for every click, and I see it in your help document.
https://help.taboola.com/hc/en-us/articles/115006030688-Creating-and-Adding-URL-Parameters-for-Tracking
And it show that β{cpc} -The realtime CPC bid of each click. The CPC value is encrypted, to decrypt it you will need to be able to execute a decryption script.Β This implementation requires technical programming knowledge. If you are able to code, contact your Taboola Account Manager to receive the guide. β
We have tech team who can develop it, so pls tell me how to do it. And I try to get help from My Account Manager, but they also don't know this.
So I check with it in your online help center.
Thanks!
Posted by Calvin over 2 years ago