Hi,
I'm unable to retrieve campaigns using Google API. I'm also not getting
errors in the response.
I'm only getting null response: Here is the code...
from google.ads.googleads.client import GoogleAdsClient
client = GoogleAdsClient.load_from_storage("google-adwords.yaml")
def stream_response(client, customer_id, query):
return client.get_service("GoogleAdsService",
version="v10").search_stream(customer_id, query=query)
try:
ga_service = client.get_service("GoogleAdsService", version="v10")
query = "SELECT campaign.name FROM campaign LIMIT 10"
response = ga_service.search_stream(customer_id="1727960937",
query=query)
for batch in response:
# Successfully iterate through response.
for row in batch.results:
print(
f"Campaign with ID {row.campaign.id} and name "
f'"{row.campaign.name}" was found.'
)
except:
print("error")
Please help.
Thanks
--
The content of this
email is confidential and intended for the recipient
specified in message only.
It is strictly forbidden to share any part of
this message with any third
party, without a written consent of the sender.
If you received this message by
mistake, please reply to this message and
follow with its deletion, so that we
can ensure such a mistake does not
occur in the future.
SAVE PAPER |
Good for your planet | Good for your
Business
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/b75da1b3-3f3b-401a-bff2-823eb52002d6n%40googlegroups.com.