Post not yet marked as solved
Post marked as unsolved with 0 replies, 258 views
I followed the
Apple documentation and got my access token. But when I call the below I get an
error. Would it be possible to help?
url = https://api.searchads.apple.com/api/v4/acls
resp =
requests.get(url)
result =
resp.json()
print(result)
Error:
{'data': None,
'pagination': None, 'error': {'errors': [{'messageCode': 'UNAUTHORIZED',
'message': 'Invalid cert. cert null', 'field': ''}]}}
--
url = https://api.searchads.apple.com/api/v4/campaigns
headers = {
"Authorization": "Bearer {"+access_token+"}",
"X-AP-Context": "orgId={"+orgId+"}"
}
resp =
requests.get(url, headers=headers)
result =
resp.json()
print(result)
Error:
{'data': None,
'pagination': None, 'error': {'errors': [{'messageCode': 'UNAUTHORIZED',
'message': 'Invalid token: 5594b1f4-9766-49e1-ba5f-ef5f23111da5', 'field':
''}]}}