【问题标题】:Google Adword API generate refresh token using generate_refresh_token.pyGoogle Adword API 使用 generate_refresh_token.py 生成刷新令牌
【发布时间】:2016-04-11 06:53:00
【问题描述】:

我按照这里的步骤操作: https://github.com/googleads/googleads-python-lib/wiki/Using-OAuth-2.0

  1. 登录谷歌开发者控制台
  2. 创建项目,然后创建凭据,然后获取客户端 ID 和客户端密码
  3. 通过pip安装googleads并下载库:https://github.com/googleads/googleads-python-lib
  4. 在此示例文件中输入客户端 ID 和客户端密码:https://github.com/googleads/googleads-python-lib/blob/master/examples/adwords/authentication/generate_refresh_token.py

    CLIENT_ID = 'xxxxxxx.apps.googleusercontent.com'

    CLIENT_SECRET = 'xxxxxxxxxxxxxxxxx'

  5. 然后我运行 generate_refresh_token.py

我收到以下错误消息:

raise AttributeError('No client_id or client_secret specified.')
AttributeError: No client_id or client_secret specified.

我真的很陌生,请告诉我我错过了什么。谢谢

【问题讨论】:

    标签: python oauth-2.0 google-api google-authentication google-api-python-client


    【解决方案1】:

    我建议您生成一个新的客户端密码。它对我有用。

    【讨论】:

    • 您是如何创建新的客户端密码的?
    猜你喜欢
    • 2021-05-15
    • 2016-01-26
    • 2015-02-03
    • 2016-08-03
    • 2020-02-06
    • 2019-06-29
    • 2017-03-21
    • 2012-02-15
    • 2014-11-25
    相关资源
    最近更新 更多