Hi,
I have the same problem, but in my GET call the httpRequestUrl is 
https://www.googleapis.com/auth/adwords
It is exactly the url indicate in the guide

The complete error I receive is this
[FeedError.INVALID_AUTH_TOKEN_FOR_EMAIL @ 
operations[0].operand.systemFeedGenerationData.oAuthInfo; 
trigger:'[email protected]']

and my code of call is this

$feedService = 
$this->adWordsServiceFactory->getFeedService($adWordsAccount->getAccount(), 
$adWordsAccount->getCustomerId());
        $gmbFeed = new Feed();
        $gmbFeed->setName('Google My Business feed #' . uniqid('', true));
        $feedData = new PlacesLocationFeedData();
        $feedData->setEmailAddress('[email protected]');
        $oAuth2Credential = (new OAuth2TokenBuilder())
            ->withClientId($this->managerClientId)
            ->withClientSecret($this->managerClientSecret)
            ->withRefreshToken($this->managerRefreshToken)
            ->build();
        $oAuthInfo = new OAuthInfo();
        $oAuthInfo->setHttpMethod('GET');
        
$oAuthInfo->setHttpRequestUrl('https://www.googleapis.com/auth/adwords');
        $oAuthInfo->setHttpAuthorizationHeader(
            sprintf('Bearer %s', 
$oAuth2Credential->fetchAuthToken()['access_token'])
        );
        $feedData->setOAuthInfo($oAuthInfo);
        $gmbFeed->setSystemFeedGenerationData($feedData);
        $gmbFeed->setOrigin(FeedOrigin::ADWORDS);
        $operation = new FeedOperation();
        $operation->setOperator(Operator::ADD);
        $operation->setOperand($gmbFeed);
        $operations = [$operation];
        $addedFeed = $feedService->mutate($operations)->getValue()[0];

I used exactly the code explained in this example 
https://developers.google.com/adwords/api/docs/samples/php/extensions
and error is generated from mutate 
$feedService->mutate($operations)->getValue()[0];

Thanks,
Enam


On Thursday, April 6, 2017 at 11:39:28 PM UTC+2, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi Jon, 
>
> The scope of the OAUTH_ACCESS_TOKEN you provide in the 
> httpAuthorizationHeader 
> <https://developers.google.com/adwords/api/docs/reference/v201702/FeedService.OAuthInfo#httpauthorizationheader>
>  
> should be "https://www.googleapis.com/auth/adwords";, same as the value 
> provided in the httpRequestUrl 
> <https://developers.google.com/adwords/api/docs/reference/v201702/FeedService.OAuthInfo#httprequesturl>.
>  
> If you use an access token with scope "
> https://www.googleapis.com/auth/plus.business.manage";, you'll encounter 
> FeedError.INVALID_AUTH_TOKEN_FOR_EMAIL. Please see this guide 
> <https://developers.google.com/adwords/api/docs/guides/feed-services-locations#creating_the_oauthinfo_object_on_the_placeslocationfeeddata>
>  
> for more information on creating the oAuthInfo 
> <https://developers.google.com/adwords/api/docs/reference/latest/FeedService.PlacesLocationFeedData#oAuthInfo>
>  
> object.
>
> Regards,
> Shwetha, AdWords API Team.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c4e6186c-c3ef-4c7f-bc67-18625bde120e%40googlegroups.com.

Reply via email to