Ad Exchange 卖方 REST API 和 API 密钥

Ad Exchange Seller REST API and API Key

我能否仅使用 API 密钥访问 Ad Exchange Seller REST API。我正在使用 Google.Apis.AdExchangeSeller.v2_0 包和 c#。我的代码如下

var service = new AdExchangeSellerService(new BaseClientService.Initializer
{
   ApplicationName = "Abc Client",
   ApiKey = "[MY APP KEY]",
});

var accounts = service.Accounts.List().Execute();

没有。 APIKEY 仅用于 public 数据。

Ad Exchange Seller REST API 要求 Accounts: list 在顶部声明它需要授权。

Authorization

This request requires authorization with at least one of the following scopes (read more about authentication and authorization).

Scope https://www.googleapis.com/auth/adexchange.seller https://www.googleapis.com/auth/adexchange.seller.readonly

您需要进行身份验证才能使用它。