Adwords api create GMB feed - GMB_ACCESS_ERROR

43 views
Skip to first unread message

Дмитрий Мачехин

unread,
Feb 9, 2018, 11:46:00 AM2/9/18
to AdWords API Forum
Example code:
$feed_service = $this->getService(FeedService::class);

$feed = new Feed();
$feed->setName('GMB');

$feedData = new PlacesLocationFeedData();
$feedData->setEmailAddress('***');
$feedData->setBusinessAccountIdentifier('***');

$oAuthInfo = new OAuthInfo();
$oAuthInfo->setHttpMethod('GET');
$oAuthInfo->setHttpRequestUrl('https://www.googleapis.com/auth/plus.business.manage');
$oAuthInfo->setHttpAuthorizationHeader('Bearer '.$gmb->getAccessToken());
$feedData->setOAuthInfo($oAuthInfo);
$feed->setSystemFeedGenerationData($feedData);
$feed->setOrigin(FeedOrigin::ADWORDS);

$feed_operation = new FeedOperation();
$feed_operation->setOperand($feed);
$feed_operation->setOperator(Operator::ADD);

$feed_service->mutate(array($feed_operation));

Return error: FeedError
.GMB_ACCESS_ERROR @ operations[0].operand.systemFeedGenerationData.gaiaId

If using "businessAccountIdentifier" i'm get error: FeedError.BUSINESS_ACCOUNT_CANNOT_ACCESS_LOCATION_ACCOUNT @ operations[0].operand.systemFeedGenerationData.businessAccountIdentifier


The error appeared a day ago, by itself (the source code was not touched)

Who will say what kind of errors?

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 9, 2018, 11:59:12 AM2/9/18
to AdWords API Forum
Hi, 

We are aware of this issue. Our team is currently looking into this. I'll keep you posted as soon as I have any updates about this. 

Thanks,
Sreelakshmi, AdWords API Team

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 9, 2018, 1:38:39 PM2/9/18
to AdWords API Forum
Hi, 

I also noticed that you are using one of the old scopes in the OAuthInfo object’s httpRequestUrl field. You will need to update that to the AdWords API scope: https://www.googleapis.com/auth/adwords. Also, please make sure that you are using the OAuth tokens generated with the AdWords API Scope as mentioned in this blog. The error that you are getting doesn't seem to be because of this. But, you will still need to make the changes to the scopes as the support for old scope is being removed. 

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Feb 9, 2018, 5:17:01 PM2/9/18
to AdWords API Forum
Hi, 

Could you please retry your request and see if it is working for you?
Reply all
Reply to author
Forward
0 new messages