Php Bing Ads API:帐户ID无效

Php Bing Ads API:帐户ID无效,php,bing-api,Php,Bing Api,我们正面临Bing广告API版本9和10的问题 我们正在使用ClientProxy类的ConstructionWithAccountandCustomerId()方法,提供有效的DeveloperToken、AccountId和AuthenticationToken(OAuth),如下所示: $proxy = ClientProxy::ConstructWithAccountAndCustomerId($wsdl, null, null, $DeveloperToken, $AccountId,

我们正面临Bing广告API版本9和10的问题

我们正在使用
ClientProxy类的
ConstructionWithAccountandCustomerId()
方法,提供有效的DeveloperToken、AccountId和AuthenticationToken(OAuth),如下所示:

$proxy = ClientProxy::ConstructWithAccountAndCustomerId($wsdl, null, null, $DeveloperToken, $AccountId, null, $AuthenticationToken);
我们的目标是检索并列出一个帐户的所有活动。但是,在运行时:

print_r($proxy->GetService()->GetCampaignsByAccountId($AccountId));
…我们面临这个错误:

[Code] => 1102 
[Details] => AccountId is invalid 
[ErrorCode] => CampaignServiceInvalidAccountId 
[Message] => The account ID is invalid.
现在,我们已经对AccountID进行了双重和三重检查()

我们还尝试了Bing广告API v9和Bing广告API v10,以及无骰子游戏

对我们缺少的东西有什么想法吗


感谢

问题和解决方案非常简单:GetActivationsByAccountd服务操作需要一个特殊的请求对象,帐户ID本身是不够的:

$request = new GetCampaignsByAccountIdRequest(); 
$request->AccountId = $AccountId; 
$request->CampaignType = CampaignType::SearchAndContent; 
定义此对象并将其馈送到GetActivationsByAccountd服务操作后,将成功返回帐户的所有活动:

print_r($proxy->GetService()->GetCampaignsByAccountId($request));