PHP SDK - OAuth [英] PHP SDK - OAuth

查看:70
本文介绍了PHP SDK - OAuth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个应用程序并生成了一个OAuth令牌来处理PHP SDK示例文件中的报告示例,但是我遇到了经过身份验证的问题。在示例中,(关键字效果报告)详细设置了UN和PW以及
,然后将它们传递到ConstructWithAccountId函数中,由于我通过MSFT帐户而不是Bing Ads访问帐户,因此无法执行此操作UN / PW组合。我查看了代码,并尝试将UN和PW字段设置为null,然后传入
我的身份验证令牌,但我仍然得到105错误,而不是我可以使用的109错误。我在使用ConstructWithCredentials函数时遇到了同样的错误。 

I've setup an application and have generated an OAuth token to work with the Reporting Samples in the PHP SDK example files but I'm having issues with getting authenticated. In the sample, (Keyword Performance Report), it details setting the UN and PW and then passing them into the ConstructWithAccountId function, which I can't do since I access the account through a MSFT account rather than Bing Ads UN/PW combo. I reviewed the code and have tried setting the UN and PW fields to null and then passing in my authentication token but I still get a 105 error, rather than a 109 which I could work with. I get the same error with the ConstructWithCredentials function. 

我是否无法在OAuth中使用这些功能?我是否应该将UN和PW以外的其他内容与我的令牌一起传递给它们? 

Am I not able to use these functions with OAuth? Should I pass something other than null for the UN and PW into them along with my token? 

谢谢!

$authenticationToken = 'NNNNNNNNNN';
$DeveloperToken = "NNNNNNNNNN";


// Reporting WSDL.

$wsdl = "https://api.bingads.microsoft.com/Api/Advertiser/Reporting/V9/ReportingService.svc?singleWsdl";




try
{
		$proxy = ClientProxy::ConstructWithCredentials($wsdl, null, null, $DeveloperToken, $authenticationToken);

推荐答案

您好。

我们更新了
Bing Ads PHP Classes
 今天下载包,以解决另一个问题。想要通知您,无论哪种方式,您都可以获得最新版本。 

We did update the Bing Ads PHP Classes download package today, to address a separate issue. Wanted to let you know so either way you can get the latest release. 

以下任何一项工作都适合我:

Either of the following work for me:


proxy = ClientProxy :: ConstructWithAccountId(
proxy = ClientProxy::ConstructWithAccountId(


wsdl,null,null,
wsdl, null, null,


这篇关于PHP SDK - OAuth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆