zoukankan      html  css  js  c++  java
  • Google Adwords API

    Google Adwords API 分正式API和测试API。

    基中正式API是需要收取费用,Google将以API单位收费;而测试API(Sandbox)中的则不收取任何费用,但有些API返回的结果是Google定义好的,不怎么好测试!Google也是近期刚发布的V13版本,以前是V12,因为我Email账号是没缴费的账号,所以是不能用正式的API来调试Service的。充值后Google会先扣掉50块,不明所以!

    如在项目中分别引用两类API:

    • 正式API

      URL:https://adwords.google.com/api/adwords/v13/AccountService?wsdl

      引用命名:GoogleAdwords.AccountService

    • 测试API

      URL:https://sandbox.google.com/api/adwords/v13/AccountService?wsdl

      引用命名:GoogleAdwords.Sandbox.AccountService

    代码如下,分别测试时就会有如下错误:

    Code

    如果使用正式的API运行上面的代码,就会报“无效的开发者令牌”,如:System.Web.Services.Protocols.SoapException: The developer token is invalid.

    如果使用测试的API运行,则会正确的返回如下信息:

    Login email is "client_1+itblackhole@gmail.com".
    Login email is "client_2+itblackhole@gmail.com".
    Login email is "client_3+itblackhole@gmail.com".
    Login email is "client_4+itblackhole@gmail.com".
    Login email is "client_5+itblackhole@gmail.com".

     

  • 相关阅读:
    POJ 3672 水题......
    POJ 3279 枚举?
    STL
    241. Different Ways to Add Parentheses
    282. Expression Add Operators
    169. Majority Element
    Weekly Contest 121
    927. Three Equal Parts
    910. Smallest Range II
    921. Minimum Add to Make Parentheses Valid
  • 原文地址:https://www.cnblogs.com/blackcore/p/1588591.html
Copyright © 2011-2022 走看看