Programmatically Claim URL

235 views
Skip to first unread message

Sony Music

unread,
Sep 16, 2011, 12:53:45 PM9/16/11
to Google Content API for Shopping
Our situation is that we have 700+ stores. This list also changes a
lot, so we're trying to do everything from the server. Is there any
way to download the verify the URL purely programmatically?

Daniel Hermes

unread,
Sep 16, 2011, 1:52:08 PM9/16/11
to google-content-...@googlegroups.com
Dear Sony Music,

There is no verification API. It may be easiest for you to just create a TXT record for all of these domains as outlined here:

Also, if you visit https://www.google.com/webmasters/tools/home and click "Add site", you'll see the ability to serve an HTML file to verify ownership.

You may also find it easier to have all your subaccounts verify their urls and then for you to sign up for a multiclient account (http://www.google.com/support/merchants/bin/answer.py?answer=188487).

Regards,


--
You received this message because you are subscribed to the Google Groups "Google Content API for Shopping" group.
To post to this group, send email to google-content-...@googlegroups.com.
To unsubscribe from this group, send email to google-content-api-fo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-content-api-for-shopping?hl=en.




--
Daniel Hermes | Developer Programs Engineer | dhe...@google.com | (815) 440-7093

Daniel Hermes

unread,
Sep 16, 2011, 2:21:51 PM9/16/11
to google-content-...@googlegroups.com
It looks like I spoke too soon!

I spoke to the Webmaster team and an API exists: http://code.google.com/apis/siteverification/

Sony Music

unread,
Sep 16, 2011, 2:45:36 PM9/16/11
to Google Content API for Shopping
Thank you very much for the help -- we'll work it out somehow.

While I have you on the line, I have a question about testing: We're
developing all of this in a TDD environment -- is there a sandbox that
we can run tests against? This would be sub-account creation, feed
creation and item CRUD.

On Sep 16, 1:52 pm, Daniel Hermes <dher...@google.com> wrote:
> Dear Sony Music,
>
> There is no verification API. It may be easiest for you to just create a TXT
> record for all of these domains as outlined here:http://www.google.com/support/a/bin/answer.py?answer=183895
>
> Also, if you visithttps://www.google.com/webmasters/tools/homeand click
> "Add site", you'll see the ability to serve an HTML file to verify
> ownership.
>
> You may also find it easier to have all your subaccounts verify their urls
> and then for you to sign up for a multiclient account (http://www.google.com/support/merchants/bin/answer.py?answer=188487).
>
> Regards,
>
> On Fri, Sep 16, 2011 at 9:53 AM, Sony Music <m2dcgm.test...@gmail.com>wrote:
>
> > Our situation is that we have 700+ stores.  This list also changes a
> > lot, so we're trying to do everything from the server.  Is there any
> > way to download the verify the URL purely programmatically?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Content API for Shopping" group.
> > To post to this group, send email to
> > google-content-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-content-api-fo...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-content-api-for-shopping?hl=en.
>
> --
> Daniel Hermes | Developer Programs Engineer | dher...@google.com | (815)
> 440-7093

Daniel Hermes

unread,
Sep 16, 2011, 3:02:28 PM9/16/11
to google-content-...@googlegroups.com
There is a way to send requests in dry run mode (http://code.google.com/apis/shopping/content/getting-started/usingapi-products.html#DryRun) but I am unsure if this applies to account management (http://code.google.com/apis/shopping/content/multiclientaccounts/mcaccounts.html). I will ask the team and get back to you.
Daniel Hermes | Developer Programs Engineer | dhe...@google.com | (815) 440-7093

Sony Music

unread,
Sep 16, 2011, 3:14:33 PM9/16/11
to Google Content API for Shopping
I'm messing with the dry run mode and get the 'can't post items to an
unverified site' message. A sandbox of some sort would be the optimum
that I could hope for, including account management and verification,
feed management as well as managing products. Standing by.

Thanks!

On Sep 16, 3:02 pm, Daniel Hermes <dher...@google.com> wrote:
> There is a way to send requests in dry run mode (http://code.google.com/apis/shopping/content/getting-started/usingapi...)
> but I am unsure if this applies to account management (http://code.google.com/apis/shopping/content/multiclientaccounts/mcac...).
> I will ask the team and get back to you.
>
> Daniel Hermes | Developer Programs Engineer | dher...@google.com | (815)
> 440-7093

Daniel Hermes

unread,
Sep 16, 2011, 3:19:30 PM9/16/11
to google-content-...@googlegroups.com
The dry run mode is our equivalent of a sandbox through the API. What request was giving that response?
Daniel Hermes | Developer Programs Engineer | dhe...@google.com | (815) 440-7093

Sony Music

unread,
Sep 16, 2011, 4:06:39 PM9/16/11
to Google Content API for Shopping
In this case, POST to "http://content.googleapis.com/content/account/
11653901/datafeed/products/4069121"

REQUEST

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:batch="http://
schemas.google.com/GData/batch" xmlns:sc="http://schemas.google.com/
structuredcontent/2009" xmlns:scp="http://schemas.google.com/
structuredcontent/2009/products">
<entry>
<batch:operation type="insert"/>
<title>Goodbye Lullaby</title>
<content>Check out this product at the Avril Lavigne Store.</
content>
<link href="http://www.myplaydirect.com/avril-lavigne/goodbye-
lullaby/details/5729702" rel="alternate" type="text/html"/>
<sc:id>5729703</sc:id>
<scp:google_product_category>Media/Music</
scp:google_product_category>
<scp:product_type>Music::DigitalAlbum</scp:product_type>
<sc:image_link>http://images.sonymusicdigital.com/autoimage/
display/product-detail/media.sonymusicd2c.com/manual/Avril_Lavigne-
Goodbye_Lullaby/1000x1000.jpg/1000x1000</sc:image_link>
<sc:content_language>en</sc:content_language>
<sc:target_country>US</sc:target_country>
<scp:condition>New</scp:condition>
<scp:availability>in stock</scp:availability>
<scp:price unit="USD">10.99</scp:price>
<scp:gtin>884977373417</scp:gtin>
</entry>
.
.
.

RESPONSE

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://content.googleapis.com/content/account/11653901/item/
products/batch/1316203385589</id>
<updated>2011-09-16T20:03:05.930Z</updated>
<title>Batch Feed</title>
<entry xmlns:batch="http://schemas.google.com/gdata/batch"
xmlns:gd="http://schemas.google.com/g/2005">
<updated>2011-09-16T20:03:05.930Z</updated>
<title>Error</title>
<content type="application/vnd.google.gdata.error+xml">
<gd:errors>
<gd:error>
<gd:domain>ProductSearch</gd:domain>
<gd:code>auth/frontend/not_claimed</gd:code>
<gd:location type="other">item</gd:location>
<gd:internalReason>Please verify and claim your website's
URL, until you do so you cannot upload any product listings.</
gd:internalReason>
<id>online:en:US:5729703</id>
</gd:error>
</gd:errors>
</content>
<batch:status code="400" reason="Please verify and claim your
website's URL, until you do so you cannot upload any product
listings."/>
</entry>


On Sep 16, 3:19 pm, Daniel Hermes <dher...@google.com> wrote:
> The dry run mode is our equivalent of a sandbox through the API. What
> request was giving that response?
>
> Daniel Hermes | Developer Programs Engineer | dher...@google.com | (815)
> 440-7093

Sony Music

unread,
Sep 16, 2011, 4:08:58 PM9/16/11
to Google Content API for Shopping
Oh -- I do acutally use the right URL -- misposted it above

"https://content.googleapis.com/content/v1/11653901/items/products/
schema/batch?dry-run"

Daniel Hermes

unread,
Sep 16, 2011, 4:34:15 PM9/16/11
to google-content-...@googlegroups.com

Sony Music

unread,
Sep 19, 2011, 11:00:57 AM9/19/11
to Google Content API for Shopping
As most of the stores (and their products) use those two domains,
would claiming them suffice for all stores or would I have to reclaim
them for each store?

On Sep 16, 4:34 pm, Daniel Hermes <dher...@google.com> wrote:
> Have you claimed both naked domains sonymusicdigital.com and
> myplaydirect.com?
>
> Please see:http://www.google.com/support/merchants/bin/answer.py?lev=+answer&cbi...
> Daniel Hermes | Developer Programs Engineer | dher...@google.com | (815)
> 440-7093

Daniel Hermes

unread,
Sep 19, 2011, 2:24:43 PM9/19/11
to google-content-...@googlegroups.com
See http://www.google.com/support/merchants/bin/answer.py?answer=188487 for details on verifying and claiming websites under a Multi-client account.

Regards,
Daniel Hermes | Developer Programs Engineer | dhe...@google.com | (815) 440-7093

jesstelford

unread,
Sep 21, 2011, 12:11:53 AM9/21/11
to Google Content API for Shopping
A POST when inserting a new sub account does not work in the dry-run
mode (infact, it completes and then persists the result as if dry-run
was never used):

https://groups.google.com/group/google-content-api-for-shopping/browse_thread/thread/e1f7d9f39ca05bd7?pli=1

Is this intended behaviour or a bug?

On Sep 17, 5:19 am, Daniel Hermes <dher...@google.com> wrote:
> The dry run mode is our equivalent of a sandbox through the API. What
> request was giving that response?
>
> Daniel Hermes | Developer Programs Engineer | dher...@google.com | (815)
> 440-7093

Daniel Hermes

unread,
Sep 21, 2011, 12:16:45 PM9/21/11
to google-content-...@googlegroups.com
I'm sorry I was just notified that dry-run is only supported for the items feed. The parameter is ignored for all other feeds.

If this feature is desired, let me know and I'll pass along a feature request to the eng team.

Regards,
Daniel Hermes | Developer Programs Engineer | dhe...@google.com | (815) 440-7093

jesstelford

unread,
Sep 21, 2011, 6:45:07 PM9/21/11
to google-content-...@googlegroups.com
Thank you for the clarification, Daniel.

I would very much like to see dry-run supported for creating client accounts and the related activities (such as editing the client, adding a new feed, etc).

Daniel Hermes

unread,
Sep 21, 2011, 6:51:18 PM9/21/11
to google-content-...@googlegroups.com
Jess,

I will be sure to pass along the request.

Regards,

On Wed, Sep 21, 2011 at 3:45 PM, jesstelford <jesst...@gmail.com> wrote:
Thank you for the clarification, Daniel.

I would very much like to see dry-run supported for creating client accounts and the related activities (such as editing the client, adding a new feed, etc).

--
You received this message because you are subscribed to the Google Groups "Google Content API for Shopping" group.

To post to this group, send email to google-content-...@googlegroups.com.
To unsubscribe from this group, send email to google-content-api-fo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-content-api-for-shopping?hl=en.

Sony Music

unread,
Sep 22, 2011, 11:58:45 AM9/22/11
to google-content-...@googlegroups.com
Daniel,

Sorry I disappeared for a bit, but thank you again for your help.  Ultimately what worked for us was to claim the domain URL by hand and allow all of the managed stores to inherit that verification.  This works for us as all of our stores are subdirectories of the parent domain (http://our_domain/store_a, http://our_domain/store_b, etc.).  We do have vanity URLs for some clients and we'll have to deal with those down the road.

I'll vote twice for the full-fledged sandbox for all of this.  We have a large application with a lot of moving parts and it's one of those bugaboos that keeps me up at night that we can't put together full-fledged tests that exercise everything except in production.

Thanks again!
Reply all
Reply to author
Forward
0 new messages