如何为AdWords API脚本生成USER_AGENT [英] How to generate the USER_AGENT for AdWords API script

查看:151
本文介绍了如何为AdWords API脚本生成USER_AGENT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了使用Python从AdWords-API提取数据,生成USER_AGENT的最有效方法是什么?这个值是我能够提取数据所需的最后一个值.任何帮助将不胜感激.

What is the most effective way to generate the USER_AGENT in order to pull data from the AdWords-API using Python? This value is the last value I need to be able to pull data. Any help would be greatly appreciated.

user_agent: INSERT_USER_AGENT_HERE

推荐答案

很幸运,我想出了解决方法.如此处所述:

Thankfully, I figured out how to resolve this. As noted here:

http://googleadsdeveloper.blogspot.ca/2013/11/please-set-user-agent-or-application.html

USER_AGENT字段是一个可选字段. AdWords,DFP和DFA API可以在SOAP标头中使用用户代理字符串,并且所有客户端库都允许您在其配置文件中设置此字符串.就是说,为每个应用程序将此值设置为唯一且有用的值符合您自己的最大利益.

the USER_AGENT field is an optional field. The AdWords, DFP, and DFA APIs can take a user agent string in the SOAP headers, and the client libraries all allow you to set this string in their configuration files. That said, it is in your own best interests to set this value to something unique and useful for each of your applications.

这篇关于如何为AdWords API脚本生成USER_AGENT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆