Hi Shiv, Since you are using a client library for your operations, our recommendation would be to refer to the yaml file in accordance to the current standard. With this, we can ensure the security of your credentials as it will avoid being maintained anywhere in your code.
However, should you require further assistance, you can get in touch with the client library owners via this link <https://github.com/googleads/googleads-python-lib/issues> as they are better equipped to assist you regarding this matter. Best regards, Peter AdWords API Team On Wednesday, October 24, 2018 at 7:05:22 AM UTC+8, shivankit sharma wrote: > > While i have a working code, I am trying to run it in an Azure Spark > cluster. This creates an issue since i cannot use the yaml based > credentials. How can the code be modified to run by keeping the credentials > within the script itself rather than pulling from the yaml file > > REPORT_TYPE = 'VIDEO_PERFORMANCE_REPORT' > > def main(adwords_client): > report_downloader = adwords_client.GetReportDownloader(version='v201809') > > # Create report definition. > report = { > 'reportName': 'VIDEO_PERFORMANCE_REPORT', > 'dateRangeType': 'LAST_7_DAYS', > 'reportType': 'VIDEO_PERFORMANCE_REPORT', > 'downloadFormat': 'CSV', > 'selector': { > 'fields': ['Date','AdGroupStatus','AdGroupName', > 'CreativeStatus','AccountCurrencyCode','VideoViews','AverageCpv','Cost','Impressions', > > 'VideoQuartile25Rate','VideoQuartile50Rate','VideoQuartile75Rate','VideoQuartile100Rate', > > 'Clicks','AdGroupId'] > } > } > > # Print out the report as a string > print (report_downloader.DownloadReportAsString( > report, skip_report_header=False, skip_column_header=False, > skip_report_summary=False, include_zero_impressions=True)) > > > if __name__ == '__main__': > adwords_client = adwords.AdWordsClient(DEVELOPER_TOKEN, oauth2_client, > USER_AGENT,CLIENT_CUSTOMER_ID) > main(adwords_client) > > Thanks > Shiv > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/cce40899-7f2d-49d1-bbbd-9bac6931a368%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
