Discussions
What is enter a callback URL?
What is enter a callback URL?
Posted by Sasin about 13 hours ago
About limit of applications that can be created.
I received a message that the limit for application creation has been reached at
I am unable to create a new application.
I tried deleting one app that I didn't need.
But it was not possible to create a new app.
I have three questions.
1. Is it possible to create a new app even if I delete it?
Or does it take some time before I can create a new one?
If it takes time, I would like to know how long it takes to be able to create a new one.
2. Is it possible to increase the maximum number of applications that can be created?
3. Other than that, such as creating a new ORGANIZATION.
Is there any way to handle the case where we want to create more than the maximum number of apps?
Thank you in advance.
Posted by Hideaki Takaniwa 15 days ago
504 error for Ad set hourly report API
Hi,
we are getting 504 errors from server when requesting data for 2022/07/statistics/report. Is this server side issue? or something wrong we are doing?
Posted by Ameet 4 months ago
Inconsistent data for report attributedTransactions from retail media
I managed to extract data via API version 2022-10 for report attributedTransactions but it returns more data than the report extracted manually for the same campaign. It is only a few new lines, the rest of the data matches perfectly.
Why there is more data on the API report?
My request:
POST /reports/campaigns
"data": {
"attributes": {
"ids": campaign_ids,
"reportType": "attributedTransactions ",
"format": "json",
"timeZone": "UTC",
"startDate": "2022-12-01",
"endDate": "2022-12-31"
},
"type": "RetailMediaReportRequest"
}
Posted by Sheila Turuta 5 months ago
Response 403 for create campaign
I am trying to create a campaign for my client by python api, but I got response 403 with no information.
Could you help me with this? the authorization method is right, I used it to push audience and it is correct.
here is my code:
import requests
import json
import time
from creds_and_args import CLIENT_ID, CLIENT_SECRET, NEW_CAMPAIGN_NAME, ACCOUNT_ID
# Set the API endpoint URL
api_endpoint = "https://api.criteo.com/2022-10/retail-media/accounts/" + ACCOUNT_ID + "/campaigns"
# Get the Client Auth Token
def getToken():
# ================= Get access_token =================
url_token = "https://api.criteo.com/oauth2/token"
# Use the client_id & client_secret from Criteo Developer Portal
# You can modified CLIENT_ID & CLIENT_SECRET in cred_iminit.py
payload = f"grant_type=client_credentials&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}%2BRxUK6"
headers = {
"accept": "application/json",
"content-type": "application/x-www-form-urlencoded"
}
rsp_token = requests.post(url_token, data=payload, headers=headers)
rsp_token = rsp_token.json()
access_token = rsp_token['access_token']
token_type = rsp_token['token_type']
# print("ACCESS_TOKEN: ", str(access_token))
auth = str(token_type) + " " + str(access_token)
return auth
if __name__ == '__main__':
# Get the Client Auth Token and print it
Auth = getToken()
print(Auth)
# Set the campaign configuration
payload = json.dumps({
"data": {
"type": "RetailMediaCampaign",
"attributes": {
"name": NEW_CAMPAIGN_NAME,
"type": "auction",
"clickAttributionWindow": "30D",
"budget": "2.00",
"clickAttributionScope": "samesku"
}
}
})
headers = {
# 'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': Auth
}
# print(api_endpoint)
# print(headers)
# print(payload)
# Make the API request
response = requests.request("GET", api_endpoint, headers=headers, data={})
# Check the response status code
if response.status_code == 201:
# Campaign was created successfully
campaign_id = response.json()["id"]
print(f"Campaign created with ID: {campaign_id}")
else:
# There was an error creating the campaign
print("Error creating campaign: ")
print(response)
I got:
Error creating campaign:
<Response [403]>
Posted by zhihao shu 5 months ago
No python api for building an audience from contact list!
I am trying to use python api to push audience from my own database, but I can only make post call to push users to segment instead of audience. Is there a way to push my audience to the audience part?
Posted by zhihao shu 5 months ago
403 error, access-control, when searching campaigns
When running this:
-- start code --
# get all advertisers
url = 'https://api.criteo.com/2022-10/advertisers/me'
headers = {
'Authorization': 'Bearer ' + access_token,
'Accept': 'text/plain',
'Content-Type': 'application/*+json'
}
response = requests.get(url, headers=headers, data=payload)
print(response)
response.json()
-- end code --
I get the following output:
<Response [200]>
{'data': [], 'errors': [], 'warnings': []}
OK, so we have the correct access. When running this code to get campaigns:
-- start code --
# get all campaigns
url = 'https://api.criteo.com/2022-10/marketing-solutions/campaigns/search'
payload={
"filters": {}
}
headers = {
'Authorization': 'Bearer ' + access_token,
'Accept': 'text/plain',
'Content-Type': 'application/*+json'
}
response = requests.get(url, headers=headers, data=payload)
print(response)
response.json()
-- end code--
I get this out put:
<Response [403]>
{'data': None,
'warnings': [],
'errors': [{'traceIdentifier': '0HMM3BKOTTRGJ:00000001',
'type': 'access-control',
'code': 'insufficient-permissions',
'instance': '/v21q2/campaigns/search',
'title': 'Access control error',
'detail': None,
'source': None}]}
We verified we have all read rights on Audiences, Analytics, Campaigns, Catalogs, and Creatives on the app we created.
How can get the correct permissions? Or is there something else we are doing wrong?
Our goal is to get campaign statistics per day (costs, clicks, impressions for example)
Thanks in advance,
Michael
Posted by Michael Koch 7 months ago
Content Security Policy for scripts created by criteo scripts
Does Criteo script have ability to pass csp nonce so it will be used for scripts that created by https://static.criteo.net/js/ld/ld.js?
Currently we have a problem, that this script https://sslwidget.criteo.com/event is created without csp nonce so it's blocked by CSP.
Posted by Dmytro Bazanov 9 months ago
What are the rows in Analytics?
I want to withdraw metrics at Ads level, but there is not an endpoint for ads, and the lowest levelavailable seems to be Adsets.
Therefore, I'm using the endpoint statistics/report in analytics to get information on Ads level, given that there is an AdId and Ad (name).
But what are the rows exactly? If I receive a 115 rows response, for example, 28 of them have as AdId and empty string, other 28 of them have -1 as AdId and then number also repeated 28 times, then there are just a few unique values. What is the api actually returning me on rows? It doesn't seem to be Ads, then what is it?
Thank you.
Posted by Jorge Marcos Martos 10 months ago
"ConnectTimeoutError" when trying to connect to "rm-api.criteo.com/retailmedia/oauth2/token"
Hi,
hope you have a great week.
Please, could you help with the question about the Criteo Retail Media API?
We used Criteo Retail Media API, but now we are getting "ConnectTimeoutError" when trying to connect to "rm-api.criteo.com/retailmedia/oauth2/token".
We also see that the Swagger UI is currently not available: https://rm-api.criteo.com/retailmedia/swagger/ui/index#!/Authentication/OAuth2TokenPost
and documentation is also unavailable: https://support.criteo.com/s/article?article=Retail-Media-API-Guide-V1-0&language=en_US
Best regards,
Ruslan
Posted by Ruslan 10 months ago