Community Discussion
Full authentication is required to access this resource
i am integrating create campaign api
Posted by Asm over 1 year ago
You can not target/block more than 1,500 sites even if I can see only half blocked
Hi Peter,
I'm receiving this error:
{"http_status":400,"message":"You can not target\/block more than 1,500 sites.","offending_field":""}
I know the limit is 1500 per campaign and 1500 per account limit. We have blocked 1121 blocked on the account level and 463 at the campaign level.
But I don't understand why we cannot block anymore at the campaign level as I can see that we blocked only 463. There are some cases where we request to block some publisher_id and I can't see it in the blocked list even if I received the OK message.
Campaign id: 4667401
https://www.screencast.com/t/rpQvZ4Vdm
Our account is: "[email protected]"
Thank you!
Posted by alexandru ciocan about 3 years ago
Rate limits and blacklisting
Hi there,
2 questions related to the API:
1. Are there any formal API rate limits? We have not bumped into any limits, but are about to ramp up our ingest of performance data and want to make sure we are good citizens.
2. I have found API docs for the campaign-level blacklisting (https://backstage-api.readme.io/reference#patching-targeted-publishers) but no docs for an account-level blacklist. However, in the backstage UI if I go to Campaign Summary -> By Site, there does appear to be the ability to manually blacklist sites for my account. Is there a way to ingest or update this list via the API?
Thanks!
Cleve
Posted by Cleve Pasarell over 3 years ago
Unable to retrieve API Key and Secret
Where can I find my Client ID, API Key anad API Secret?
I have mailed [email protected] multiple times, however haven't gotten any reposnse.
Attaching reference ID's below
Reference ID #: ref:_00Dd0eHCX._5003o1PZwBS:ref
Reference ID #: ref:_00Dd0eHCX._5003o1PZAg4:ref
Reference ID #: ref:_00Dd0eHCX._5003o1PZobE:ref
Reference ID #: ref:_00Dd0eHCX._5003o1PZvF4:ref
Posted by Kapil Bahadur over 2 years ago
Access-Control-Allow-Origin
I'm getting an error sometimes when accessing the item_breakdown endpoint. It'll work fine the first few times and then I'll get his error. I'm masking out specific information in the calls and responses to paste them here.
The endpoint:
Request URL: https://backstage.taboola.com/backstage/api/1.0/##########-altium-sc1/reports/top-campaign-content/dimensions/item_breakdown?start_date=1900-01-01&end_date=2020-02-17&campaign=##########
Referrer Policy: no-referrer-when-downgrade
The response message after the call errors out is:
accept-ranges: bytes
content-length: 0
date: Mon, 17 Feb 2020 21:27:02 GMT
server: nginx
status: 429
via: 1.1 varnish
x-cache: MISS
x-cache-hits: 0
x-served-by: cache-chi21133-CHI
x-timer: S1581974823.691708,VS0,VE160
The error in the browser console is:
Access to XMLHttpRequest at 'https://backstage.taboola.com/backstage/api/1.0/###########-altium-sc1/reports/top-campaign-content/dimensions/item_breakdown?start_date=1900-01-01&end_date=2020-02-17&campaign=###########' from origin 'https://###############.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Posted by Brendan Malone over 3 years ago
Authorisation Code method redirect issue
Iβm hoping someone can help with a stumbling block Iβm facing with our auth flow. Iβm trying to use the Authorisation Code method outlined in the api docs (https://developers.taboola.com/backstage-api/reference#authorization-code) as follows:
This flow is similar to Implicit Grant (above), but involves an additional step:
User clicks on Connect within your App.
Your App redirects the user to a Taboola login page:
[authentication_domain]/authentication/oauth/authorize/?client_id=[client_id]&redirect_uri=[redirect-uri]&response_type=code
Note: set authentication_domain = 'https://authentication.taboola.comβ
Iβve built the Taboola login url as outlined above using our client id and desired redirect however when I test the URL and subsequent login process there is no redirect back to our app, instead the user is taken to this page within Taboola that asks whether I want to go to backstage or newsroom, both of which keep the user in Taboola.
Anyone know why I canβt redirect back out to our app to complete the authors flow?
Posted by Matt almost 3 years ago
How to get client_id and client_secret for API access
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 over 2 years ago
Issues connecting to API for new environment
Greetings,
We've worked with the backstage API a bit before, but for a new project, we had a sandbox environment set up for testing purposes.
We are having difficulty getting our API call to work, and the errors that are returning are not at all helpful. I really wish the API responded with more information to help troubleshoot.
If we use the numerical account ID provide by our account manager we get the following error:
{http_status: 403, message: "Requested action is forbiddenβ}
If we use the alpha string ID ie. "Your Account Sandbox Name" with letters and spaces we get the following error:
"Bad Request"
Our payload follows the JSON structure outlined here:
https://developers.taboola.com/backstage-api/reference#creating-a-batch-of-campaign-items
That is the method we are calling from our application, which submits the JSON object via an AJAX post.
Here is a section of our code to show what we are doing:
$url = 'https://backstage.taboola.com/backstage/oauth/token';
$data = array('client_id' => $taboolaCID, 'client_secret' => $taboolaSecret, 'grant_type' => 'client_credentials');
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$taboolaAccessToken = json_decode($result)->{'access_token'};
$ch = curl_init('https://backstage.taboola.com/backstage/api/1.0/'.$taboolaAccount.'/campaigns/'.$campaign_id.'/items/mass' );
$payload = json_encode($collection, JSON_UNESCAPED_SLASHES);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, βOur Application Name');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload );
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'cache-control: no-cache',
'Authorization: Bearer ' . $taboolaAccessToken
));
$data = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
Any assistance would be greatly appreciated.
Thanks!
Posted by Chris Ellerby almost 3 years ago