【问题标题】:Google Adwords API problems with user Authentication用户身份验证的 Google Adwords API 问题
【发布时间】:2015-07-16 17:58:15
【问题描述】:

我正在向特定帐户添加广告系列,因此我有一组帐户,然后我从 db 获取它们并将广告系列添加到这些帐户。

我连接到生产环境,得到响应

CONNECTION ESTABLISHED

但是当我尝试添加广告系列后,我得到了错误

AuthenticationError.NOT_ADS_USER @ ; trigger:'652428713780' Service[CampaignService.mutate]

调用它的部分代码:

 @srv[:campaign]= @adwords.get_service('Campaign',AdWords::Service.latest_version)
 def add_campaign(name, cc = 'HU', status = nil, budget = nil)
  budget ||= AdWordsConfig.get('hu_campaign_budget').value.to_f
  status ||= @srv[:campaign].module::CampaignStatus::PAUSED

  operation = {
    :operand => {
    :name                        => "API - #{name}",
    :status                      => status,
      :biddingStrategy             => @srv[:campaign].module::ManualCPC.new,
      :budget => {
      :period                    => 'DAILY',
      :amount => {
      :microAmount             => (budget * AMOUNT_MULTIPLIER)
    },
      :deliveryMethod            => 'ACCELERATED'
    }
  },
    :operator                      => 'ADD'
  }

  response = @srv[:campaign].mutate([operation])
  response.rval.value.first
  cid = response.rval.value.first.id

  response.rval.value.first
end

我在 google API 文档中发现这个错误意味着

#   NOT_ADS_USER

  User in the cookie is not a valid Ads user.

但我什至不知道如何检查 cookie。 我正在运行 rake 任务,连接到 adwords google com 后是否可以检索 cookie?

【问题讨论】:

    标签: ruby google-ads-api


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多