Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an authorization error while trying to get list of advertiser #109

Open
MrugankMJ opened this issue Aug 5, 2024 · 0 comments
Open

Comments

@MrugankMJ
Copy link

We want to explore API route to get data from campaign manager portal.

  1. Created API Client - Downloaded creds json and enabled campaign manager API.
  2. Authenticated the user using authenticate_using_user_account.py
  3. Tried running - get_advertiser.py using the profile ID that has admin level access in CM360.

Also this works on API Explorer on the official documentation.

PS: I am downloading the files that I need locally and triggering the code.

Error Log

Traceback (most recent call last):
File "get_advertisers.py", line 67, in
main(sys.argv)
File "get_advertisers.py", line 50, in main
response = request.execute()
File "C:\Users\g696150\PycharmProjects\Mrugank_Testpad\venv\lib\site-packages\googleapiclient_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\g696150\PycharmProjects\Mrugank_Testpad\venv\lib\site-packages\googleapiclient\http.py", line 938, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://dfareporting.googleapis.com/dfareporting/v4/userprofiles/1822640/advertisers?alt=json returned "Request
had insufficient authentication scopes.". Details: "[{'message': 'Insufficient Permission', 'domain': 'global', 'reason': 'insufficientPermissions'}]">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant