Community Discussion
Top Campaign Content Report for current day
We have a system in place that runs the `reports/top-campaign-content/dimensions/item_breakdown?start_date={date}&end_date={date}` each day at 13:00 UTC and we pass the previous days date. We've expanded this recently in an attempt to bring in today's data incrementally but it seems like the API does not return data when we pass in today's date.
Is there a way to get the data this report offers for the _current day_? I see that the Campaign Summary Report has a mention of timestamps being supported when using the hourly dimension. Is there such a thing for this endpoint/report?
Thanks in advance.
Posted by Patrick K 4 months ago
Error when trying to create an item in campaign
Hi,
I'm trying to create an item in an existing campaign, and I keep getting the following error:
{
"http_status": 404,
"message": "Resource not found",
"message_code": "api.action.resource_not_found"
}
the post request is sent to the following :
<https://backstage.taboola.com/backstage/api/1.0/${account_id}/campaigns/${account_id}/items/>
according to the documentation in this link: <https://developers.taboola.com/backstage-api/reference/create-a-campaign-item>
both the campaign and the account are valid, Do you have any Idea what can be the problem?
Thanks
Posted by Gal B 4 months ago
campaign_hour_breakdown seems 23rd/0th hour issue
Hi,
I am using campaign_hour_breakdown dimension for campaign/date/hour metrics.
But it seems the metrics between 23rd hour one one day to 0th hour of next day is attributing to 0th hour of next day.
But since those metrics are from 23rd to 0th of first day it should be there.
Because of this if we take daily counts from Portal and sum campaign_hour_breakdown metrics to date level, it is not matching
Is there any fix to resolve it.
Posted by Tara Devi 4 months ago
Taboola Access Token invalid 401
When I request a new access token, I always get the same access token. It never returns a new one. Even after days and this access token is invalid, except for 1 request.
All the other requests return 401
==== How I request the access token:
encodedParams.set('client_id', process.env.TABOOLA_CLIENT_ID);
encodedParams.set('client_secret', process.env.TABOOLA_CLIENT_SECRET);
encodedParams.set('grant_type', 'client_credentials');
const url = '<https://backstage.taboola.com/backstage/oauth/token'>;
const options = {
method: 'POST',
headers: {'content-type': 'application/x-www-form-urlencoded'},
body: encodedParams
};
==== Response I get, same token even after days
{
access_token: 'same_access_token',
token_type: 'bearer',
expires_in: 43199
}
==== Only that request is working, but it is returning old data. New campaigns aren't returned. Just adding ?fetch_level=R to the url, returns 401
const accountId = process.env.TABOOLA_ACCOUNT_ID
const accessToken = process.env.TABOOLA_ACCESS_TOKEN // I console logged this the taboola account id and the access token and they are correct
const url = `https://backstage.taboola.com/backstage/api/1.0/${accountId}/campaigns/`;
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + accessToken,
'Content-Type': 'application/json'
}
};
Posted by Daniel 4 months ago
504 gateway timeout error:- Campaign upload
hey I was uploading campaigns using the campaign upload endpoint.It uploaded some campaigns but after that it started giving me 504 error.
Posted by Sarvasva khare 4 months ago
Regarding Spend Guard Feature & Pub Unblocking
Hi Team,
We recently noticed that the publishers under our campaigns are being blocked by a feature called "Spend Guard".
If there a way for us to pull a list of publishers that this feature has blocked across our campaigns via the API? Also, is there a way that we can unblock publishers in bulk via the API?
Posted by Joy 4 months ago
Decrypt {CPC} macro using JS
We have working server side java code for decrypting {CPC} macro, ported it JS (client side).
It took some effort because of a mess with base64 /etc; now its working but code is bit ugly, was wondering is there is nice/reliable example how to decrypt {cpc}
Thanks,
Misha
Posted by Misha Makarevsky 4 months ago
Mocked endpoint
Hi,
exist a mocked endpoint for test my Java application with your SDK?
Thanks,
Jacopo
Posted by Jacopo Cappelli 4 months ago
Taboola Campaign Duplication: Campaign duplicated after API returned 401 unauthorized
We are using the backstage api to create campaigns via duplication. We faced an instance where Taboola returned 401 Unauthorized for a request but still created the campaign at their end. It was thankfully detected but this is a very dangerous situation. Allowing campaigns to be created after returning FAILED status to end user can cause spends to be incurred. Please investigate and fix the issue on priority.
Logs (Timestamps are in UTC) :
2023-11-13 10:38:50.164 INFO 1 --- [l-15-thread-145] \: --> POST <https://backstage.taboola.com/backstage/api/1.0/>\<redacted_source_account>/campaigns/30114321/duplicate?destination_account=\<redacted_destination_account> (182-byte body)
2023-11-13 10:39:17.769 INFO 1 --- [l-15-thread-145] \: \<-- 401 Unauthorized <https://backstage.taboola.com/backstage/api/1.0/>\<redacted_source_account>/campaigns/30114321/duplicate?destination_account=\<redacted_destination_account> (27605ms, unknown-length body)
The campaign was created and is present in \<redacted_destination_account> with campaign Id :30298951
Details of these account, campaigns will be shared via private correspondence to our AccountManager
Posted by Shubham A 5 months ago
404 get all campaigns
When I try to get all the campaigns, I'm getting a 404 response:
{
http_status: 404,
message: 'account',
message_code: 'api.action.resource_not_found'
}
const fetch = require('node-fetch');
require('dotenv').config();
const url = '<https://backstage.taboola.com/backstage/api/1.0/ADACCOUNTID/campaigns/'>;
const options = {
method: 'GET',
headers: {
authorization: 'Bearer ' + process.env.TABOOLA_ACCESS
}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
What could be the issue?
Posted by Daniel 5 months ago