"oauth2client.client.AccessTokenRefreshError: access_denied: Requested client not authorized."
p12_file = os.getcwd() + '**************.pem'
service_account_email = '*********@developer.gserviceaccount.com'
impersonation_user_email = '******@*****.es'
with open(p12_file, "rb") as f:
private_key = f.read()
self.auth_adwords = oauth2.GoogleServiceAccountClient(oauth2.GetAPIScope('adwords'), service_account_email, p12_file, sub=impersonation_user_email)
The error is in the last line. I need to change the .p12 key because if I use .p12 raise an error about the key and I read about the problems is PyCripto (the library used by googleads) have a problem with p12 keys.
I created the project in console.developer.google.com, and create a service account. I go to my Google for work panel and autorize de client id with the google adwords scope and the impersonation_user_mail have permissions for the entire MCC.
Someone can help me?
Thanks a lot!