Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a3a00fa9-42c1-497e-add7-1d12f9cb33da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/208e5d54-c710-45ab-859e-cb9612e2068c%40googlegroups.com.
require __DIR__ . '/vendor/autoload.php';
use GetOpt\GetOpt;use Google\Auth\CredentialsLoader;use Google\Auth\OAuth2;use Psr\Http\Message\ServerRequestInterface;use React\EventLoop\Factory;use React\Http\Response;use React\Http\Server;use UnexpectedValueException;
use Google\Ads\GoogleAds\Examples\Utils\ArgumentNames;use Google\Ads\GoogleAds\Examples\Utils\ArgumentParser;use Google\Ads\GoogleAds\Lib\V1\GoogleAdsClient;use Google\Ads\GoogleAds\Lib\V1\GoogleAdsClientBuilder;use Google\Ads\GoogleAds\Lib\V1\GoogleAdsException;use Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder;use Google\Ads\GoogleAds\V1\Errors\GoogleAdsError;use Google\Ads\GoogleAds\V1\Services\GoogleAdsRow;use Google\ApiCore\ApiException;use Google\Ads\GoogleAds\V1\Resources\Customer;use Google\Ads\GoogleAds\V1\Resources\CustomerManagerLink;
$oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
// Construct a Google Ads client configured from a properties file and the // OAuth2 credentials above. $googleAdsClient = (new GoogleAdsClientBuilder()) ->fromFile() ->withOAuth2Credential($oAuth2Credential) ->build();
$customerId = "1234112123"; /* Example */
$customerClientLinkServiceClient = $googleAdsClient->getCustomerClientLinkServiceClient();
$customerClientLink = new CustomerClientLink([ "client_customer" => new StringValue(['value' => $customerId]), "status" => ManagerLinkStatus::PENDING ]);
$customerClientLink = new CustomerClientLink([ "client_customer" => new StringValue(['value' => $customerId]), "status" => ManagerLinkStatus::PENDING ]);[LOGGING]; Optional logging settings.logFilePath = "/xxx/xxx/xxxxx/xxxxxx.xx/xxxxx/google-ads/file.log"logLevel = "INFO"Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/
namespace Google\AdsApi\Examples\AdWords\v201809\AccountManagement;
require __DIR__ . '/vendor/autoload.php';
use Google\AdsApi\AdWords\AdWordsServices;use Google\AdsApi\AdWords\AdWordsSession;use Google\AdsApi\AdWords\AdWordsSessionBuilder;use Google\AdsApi\AdWords\v201809\cm\Selector;use Google\AdsApi\AdWords\v201809\cm\Predicate;use Google\AdsApi\AdWords\v201809\cm\Operator;use Google\AdsApi\AdWords\v201809\mcm\CustomerService;use Google\AdsApi\AdWords\v201809\mcm\ServiceLink;use Google\AdsApi\AdWords\v201809\mcm\ServiceLinkLinkStatus;use Google\AdsApi\AdWords\v201809\mcm\ServiceLinkOperation;use Google\AdsApi\AdWords\v201809\mcm\ServiceType;use Google\AdsApi\Common\OAuth2TokenBuilder;
// Generate a refreshable OAuth2 credential for authentication. $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();
// Construct an API session configured from a properties file and the // OAuth2 credentials above. $session = (new AdWordsSessionBuilder())->fromFile()->withOAuth2Credential($oAuth2Credential)->build(); $adWordsServices = new AdWordsServices();
$customerService = $adWordsServices->get($session, CustomerService::class);
$serviceLinkId = "xxx-xxx-xxxx";
// Create service link.$serviceLink = new ServiceLink();$serviceLink->setServiceLinkId($serviceLinkId);$serviceLink->setServiceType(ServiceType::UNKNOWN);$serviceLink->setLinkStatus(ServiceLinkLinkStatus::ACTIVE);
// Create a service link operation and add it to the list.$operations = [];$operation = new ServiceLinkOperation();$operation->setOperator(Operator::SET);$operation->setOperand($serviceLink);$operations[] = $operation;
// Accept service links on the server and print out some information about// accepted service links.
$serviceLinks = $customerService->mutateServiceLinks($operations); // Gibt Fehler 500[2019-04-12 07:11:26] AW_SOAP.WARNING: clientCustomerId=yyy-yyy-yyyy operations=1 service=CustomerService method=mutateServiceLinks responseTime=257 requestId=0005865002d05c1c0a8585d6c1014cfd server=adwords.google.com isFault=1 faultMessage=[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro] [2019-04-12 07:11:26] AW_SOAP.NOTICE: POST /api/adwords/mcm/v201809/CustomerService?wsdl HTTP/1.1Host: adwords.google.comConnection: closeUser-Agent: PHP-SOAP/7.2.15-0ubuntu0.18.04.2Content-Type: text/xml; charset=utf-8SOAPAction: ""Content-Length: 949Authorization: REDACTED
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/mcm/v201809"><SOAP-ENV:Header><ns2:RequestHeader><ns1:clientCustomerId>948-211-5893</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>AdConnector (AwApi-PHP, googleads-php-lib/39.0.0, PHP/7.2.15-0ubuntu0.18.04.2)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns2:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns2:mutateServiceLinks><ns2:operations><ns1:operator>SET</ns1:operator><ns2:operand><ns2:serviceType>UNKNOWN</ns2:serviceType><ns2:serviceLinkId>550</ns2:serviceLinkId><ns2:linkStatus>ACTIVE</ns2:linkStatus></ns2:operand></ns2:operations></ns2:mutateServiceLinks></SOAP-ENV:Body></SOAP-ENV:Envelope>
HTTP/1.1 500 Internal Server ErrorContent-Type: text/xml; charset=UTF-8Date: Fri, 12 Apr 2019 07:11:26 GMTExpires: Fri, 12 Apr 2019 07:11:26 GMTCache-Control: private, max-age=0X-Content-Type-Options: nosniffX-Frame-Options: SAMEORIGINX-XSS-Protection: 1; mode=blockServer: GSEAlt-Svc: quic=":443"; ma=2592000; v="46,44,43,39"Accept-Ranges: noneVary: Accept-EncodingConnection: close
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header><ResponseHeader xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809" xmlns="https://adwords.google.com/api/adwords/mcm/v201809">
<ns2:requestId>0005865002d05c1c0a8585d6c1014cfd</ns2:requestId>
<ns2:serviceName>CustomerService</ns2:serviceName>
<ns2:methodName>mutateServiceLinks</ns2:methodName>
<ns2:operations>1</ns2:operations>
<ns2:responseTime>257</ns2:responseTime></ResponseHeader></soap:Header>
<soap:Body><soap:Fault><faultcode>soap:Server</faultcode>
<faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]</faultstring>
<detail><ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/mcm/v201809" xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201809"><ns2:message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]</ns2:message><ns2:ApplicationException.Type>ApiException</ns2:ApplicationException.Type><ns2:errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:InternalApiError"><ns2:fieldPath></ns2:fieldPath>
<ns2:trigger></ns2:trigger>
<ns2:errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</ns2:errorString>
<ns2:ApiError.Type>InternalApiError</ns2:ApiError.Type>
<ns2:reason>UNEXPECTED_INTERNAL_API_ERROR</ns2:reason></ns2:errors></ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope> Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.
Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/