Community Discussion
Why am I getting a 400 when trying to update the publisher targeting?
This is the function:
```
def update_exclusions(campaign_id):
payload = get_sites_to_block(campaign_id)
print(payload)
url = f'<https://backstage.taboola.com/backstage/api/1.0/lubamediaeursl-22-sc/campaigns/{campaign_id}'>
print(url)
response = requests.post(url, headers=headers, json=payload)
response.raise_for_status()
print(response.text)
return response.status_code
```
This is the payload:
```
{"publisher_targeting": {"type": "EXCLUDE", "value": ["tollywood-english", "informalnewz", "dailynewskannada-viralarticlesherecom", "talkaaj-publisher", "whiteplanettechnologies-essaybanyan", "timebucks-timecave", "pinkvilla-network", "hindikiduniya", "onevisiontechnologies-cinejosh", "lemaleadmachine-tipsandtricks", "keralakaumudi-keralakaumudi", "addatoday", "izonweb-businessleague", "govnokri", "iploc-elgoog", "izonweb-rightsofemployees", "crowdyfan", "academynewspaper-mysurumithra", "vivo-browser-chrome-english", "kashmirlife", "vitaminnews", "vivo-browser-sc-india-english", "greaterkashmircom", "tamilspark", "xfreehub", "cinereporters", "gadgetheory-mobilet", "studentsea", "vivo-browser-sc-india-gujarati", "vivo-browser-sc-india-tamil", "valappottukal", "healthynews-tv", "learnitwise", "pinoydesigns-ulrichome", "nalandalive", "lankasri-viduppu", "sunmixnetwork-cineulagam", "sunmixnetwork-ibctamil", "excusemeodisha-excusemeodisha", "nationalherald-english", "storytohearhu-p19553600", "jobsbazzar-vivasaayathaikappom", "eurasiantimes", "albvisioninternational-insidedogsworld", "momagic-retailpn", "entertainmentportal", "mods4you", "lankasri-ibctamilnadu", "housejogger", "newsaromamedia", "odiapost-enews23", "prabodhanprakshan-saamana", "fpj-amp", "odishatv-khabarodishatv", "tastyrecipesnew-jobsatqatar", "tastyrecipesnew-upstudent", "tastyrecipesnew-jobatcanada", "tastyrecipesnew-omanjobvacancy", "jobsbazzar-viewkhabar", "odishabhaskar", "prabhasakshi-prabhasakshi", "unidadeditorial-marcaenglish", "sexpacket-trendigt", "messagecube-supereasygame", "ptcnetwork-ptcnews", "foodhealth-astrologyviral", "krishijagran-odia", "zeemedia-dnaindiahindi", "firstnaukris", "indiagovtexam", "kolkata24x7india", "hellomaharastra", "ellomaharastra-hellokrushi", "ekanktechnologies-samhita", "etvbharat-etvbharathindibihar", "etvbharat-etvbharathindiuttar-pradesh", "etvbharat-etvbharathindiuttarakhand", "etvbharat-etvbharatkannadakarnataka", "etvbharat-etvbharatenglishnational", "etvbharat-etvbharathindiharyana", "etvbharat-etvbharattamiltamil-nadu", "worldfamilys", "banglahunt-bongtrend", "thetribuneindia-tribuneindia", "sattarani-publisher", "tastyrecipesnew-cookingvideos", "dainikbharat24-publisher", "prabhatkhabarindia-prabhatkhabar", "upuklive-loveindianational", "gujaratsamacharindia-gujaratsamacharweb", "gadgetsupdateshindi", "jagrannewmedia-gujaratijagran", "network18media-news18tamil", "network18media-news18telugu", "network18media-news18bengali", "network18media-cnbc-tv18english", "tastyrecipesnew-footballwing", "tastyrecipesnew-movieshows", "technewswebs", "lalluram", "thetelugunews-publisher", "siddhmaniconsultants-samarcharjagat", "rozanaspokesman-publisher", "ndtv-tools", "backtobollywood-publisher", "hellobdnewz-publisher", "lfimedia-goodtoknowthist", "gadgetsupdateshindi-bharatyojanaorg", "stepsetgoindia-sdk-android", "ecovahan-publisher", "mediamangalam-publisher", "infokhabars-publisher", "vtv-gujarati", "allindiasamachar2021-thekarnatakanews", "karimizhi-thani-nadanin", "royalbulletin-publisher", "fantoo-android", "indianspost-publisher", "tamizhanmedia", "divyahimachal-publisher", "ntvtelugu-publisher", "vikatandigital-vikatancom", "kajersubidha-publisher", "sarkarihelp-publisher", "updatenews360-publisher", "tv9-hindi", "tv9-telugu", "ecovahan-vyaparkaro", "kannadanewstoday-publisher", "tastyrecipesnew-cricketindnews", "sstvkannada-publisher", "ndtv-mp", "primereel-publisher", "t2blive-publisher", "hosakannada-hosavishya", "shethepeopleindia-hindi", "tnstudycorner-publisher"]}}
```
This is the response:
400 Client Error: Bad Request for url: <https://backstage.taboola.com/backstage/api/1.0/lubamediaeursl-22-sc/campaigns/27990851>
Posted by [email protected] 8 days ago
API / Token not working | Network account problem settings
Hello,
We've requested an account conversion from a single regular account to a Network account with two accounts inside. After we got them, we requested th new client id and secret token for each one of them (Network, account 1 and account 2) but only 2 of the 3 accounts work correctly. We checked everything on our side and it seems that the problem is with the setup of the Network account and account 1.
API / Token Doesn't Work for this account --> iPink 1 --> we have all the campaigns running here (setupdone by Taboola during the account change) but we don't get the data from here with the API beacuse it doesn't work.
API / Token Works Correctly for these two --> iPink - Network and iPink 2 --> But we are getting the data through the API from the Network account instead of iPink 1 account.
We need to fix this in order to have the Network account setup properly and be able to get the data from the API of account iPink 1 (advertiser account)
Thanks!
Posted by Pilar/Pino 23 days ago
Add to Pixel Audience via API
We're looking to create a custom pixel audience, so we can exclude users in this audience for 1 day. We're looking to add a user frequency cap basically across certain accounts. This specific implementation doesn't give us the option to fire a pixel, since it's going direct to a landing page we don't have control over. We could add a page in between the landing page and our ads, but we could lose some users that way. Is there a way to post a user to a pixel audience via api?
The reason we're looking to use a pixel audience vs a custom audience is the ability to include a user in the audience for only 1 day, which is available in the pixel audience, and also not having first party user data. What are our best options to add users to this audience via api?
Posted by Craig 25 days ago
Regarding API Time Zone
Hi Team,
Please note that we recently got the time zone for 4 taboola accounts changed to PST. Would it be safe to assume that our existing API credentials would now return the data in the same time zone for the said accounts?
Posted by Erwin 26 days ago
Changes history API
Hi,
is it possible to get the changes history data with API? if not it is something you can add?
Thanks,
Amir.
Posted by Amir 27 days ago
Getting error "Requested action is forbidden: Duplication of bid modifiers for Max Conversions or Target CPA is not allowed"
Dear Support Team,
While trying to create a duplicate campaign, I'm getting error for some campaigns.
**Endpoint:** <https://developers.taboola.com/backstage-api/reference/duplicate-a-campaign>
**Error Message:** Requested action is forbidden: Duplication of bid modifiers for Max Conversions or Target CPA is not allowed.
Kindly do check it and let me know if you need more information from my side.
Thanks & Regards,
Mayank Sharma
Posted by Mayank Sharma about 1 month ago
Content Quality Ratings Missing Field
Hi, I am trying to pull "Content Quality" data (<https://help.taboola.com/hc/en-us/articles/6653430738071-Content-Quality-Ratings>) for our campaigns through the "Get a Campaign" API call but I can't find this specific field.
Could you please confirm whether it's supported to retrieve Content Quality data through the above API call? I also tried the "Campaign Summary Report" route but without success.
While I did find the 'safety_rating' field, it doesn't seem to encompass the complete range of Content Quality values. Notably, it lacks distinctions like "premium," only offering "high" and "medium" ratings.
I appreciate your assistance in clarifying if it's possible to access Content Quality data via the API and if I might be overlooking something.
Best Regards,
Elad Sachs
Posted by Elad Sachs about 1 month ago
bulk update several campaigns cpc bid in one api command?
What is the write way to update several campaigns cpc bid in one api command?
I am writing it wrong as I do not know coding but I will appreciate a right code for this idea
{
"campaigns": [
27024300
],
"update": {
"cpc": 0.01,
"is_active": true
}
};
{
"campaigns": [
26986128
],
"update": {
"cpc": 0.03,
"is_active": true
}
}
--- end of code
I am using Postman software
Any other solution to upload like csv file like this
27024300:0.01
26986128:0.03
it will be better?
Thanks in advance
Posted by null about 1 month ago
Bulk update seperate countries
1. is there a way to duplicate campaign and force all his ad urls to a different ad url?
doing it online is slow + i need to separate between images media and video mediabcause i cannot edit both in bulk - so any solution for that?
2. anyway that a campaign will be in csv file or something that I can edit offline and upload it ready?
This will help me make things easier in bulk
3. any ideas to help me create separate campaigns for each country
It's basically duplicate campaign, change country and change all ads (images and motion ads) urls
Posted by Nathan about 1 month ago
Pull Stats Using Campaign + Publisher + Hour
We are not seeing any option in the Taboola API documentation to pull stats at a campaign + publisher + hour level. Would it be possible for you to check if such an option exists in the API and if yes share details/documentation around the same.
Posted by Kunal about 1 month ago