我正在使用需要连接到 Adwords 的 codeigniter 用 php 开发一个应用程序,我有很多问题......
首先,我有一个测试帐户,我不知道我是否连接正确,因为我不知道我必须把什么作为 developerToken、clientId 和 defaultServer。哪个是正确的?
$username = "my_email@gmail.com";
$password = "my_password";
//Developer Token options
$developerToken_1 = "E2SGs1l7gEWWdCfeYSO4oA"; //It's not my real token..
$developerToken_2 = "my_email@gmail.com++USD";
$user = new AdWordsUser(null, $username, $password, $developerToken);
//Default Servers
//Option 1
$user->SetDefaultServer("https://adwords.google.com/");
//Option 2
$user->SetDefaultServer("https://adwords-sandbox.google.com");
//Option 3
$user->SetDefaultServer("https://sandbox.google.com");
//Client ID
//Option 1
$user->SetClientId('client_id_1+my_email@gmail.com');
//Option 2
$user->SetClientId('1234567890');
我想我必须使用adwords版本v201306
$campaignService = $user->GetService('CampaignService', 'v201306');
如果我使用“ https://adwords.google.com/ ”作为服务器,我会收到:
Uncaught exception 'OAuth2Exception' with message '{
"error" : "invalid_client"
}'
与其他服务器一起,我收到:
A PHP Error was encountered
Severity: Warning
Message:
SoapClient::SoapClient(https://sandbox.google.com/api/adwords/cm/v201306/CampaignService?wsdl): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Filename: Lib/AdsSoapClient.php
或者
A PHP Error was encountered
Severity: Warning
Message:
SoapClient::SoapClient(https://adwords-sandbox.google.com/api/adwords/cm/v201306/CampaignService?wsdl): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Filename: Lib/AdsSoapClient.php
我应该怎么办?我在太多的网站上阅读了很多,我不知道如何解决它
非常感谢!!