AdWords
2K members online now
2K members online now
For questions related to Google Shopping and Merchant Center. Learn to optimize your Shopping ads
Guide Me
star_border
Reply

Upload feed to Google Cloud Storage

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I'm moving feeds from daily fetches to Google Cloud storage.

 

Google Shopping Account is linked to Google Cloud Storage with same email address and I created a Service account key on Developers Console and added owner permissions to 'allAuthorised Users'.

Unfortunately I can't upload feeds to buckets generated by Google Shopping (merchantcentre{id}), I receive '401 Unauthorized' or '403 Forbidden' depending on which key format I use (p12 vs json).

Our systems use Java client library and I'm able to upload files to buckets I create and manage via Developers Console -> Storage.

 

Any ideas to upload the feed to Google Cloud Storage?

 

Thank you!!

1 Expert replyverified_user

Re: Upload feed to Google Cloud Storage

[ Edited ]
Top Contributor
# 2
Top Contributor

generally, 401 is a request/token issue; 403 is an access/grant issue.


first, be certain that the google-account being used as the cloud's
current-user, to assign the bucket, is the same google-account that
is used to access and link the merchant-center-account; otherwise,
the different-user option must be selected during the initial linking.

also, be certain that the registered feed file name matches exactly,
and a proper file-extension is used for a google-supported format --
for example, either inventory.txt (tab-delimited) or inventory.xml

either gsutil or the gs-python library are recommended to schedule uploads.

regardless, typically, 401/403 errors are associated with
either an improper credential or expired access-tokens.

the access-token must be checked and refreshed after expiration --
401-errors must be caught, token refreshed, and the request retried.

having the returned descriptions, in addition to the status-codes, may help.

if a google-compute-engine instance or another domain/account is used,
be certain that the instance or site has the proper permissions enabled --
usually, service-accounts can only be used with a google-apps-domain.

also, try adding the service-account email
as an admin user in the merchant-center.

as an aside, if a google-business-account is used then,
the bucket may not be usable for the merchant-center --
check with the administrator of the business-account.

otherwise, the best likely course is to post in one of the related
cloud-storage forums or consult with a merchant-center feed
specialist directly at google.

 

alternatively, sftp may be used to upload a feed file directly.

see also
https://support.google.com/cloud/answer/3466163
https://support.google.com/merchants/contactflow
https://support.google.com/merchants/answer/4581834

Re: Upload feed to Google Cloud Storage

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks Celebird for your quick reply.

I finally managed to upload the feed, it was the email address linked on Google Shopping.
I was using the user email address logs into Google; I switched to use the email address from Key client email ({key name}@{project id}.iam.gserviceaccount.com)

I think it would be worth to add this info on the documentation about using Google Cloud Storage and Merchant.

Thanks a lot

Re: Upload feed to Google Cloud Storage

Top Contributor
# 4
Top Contributor
you're welcome and thank you for the update.