Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT</strong> rewrote the answer after diving into the Google's API documentation</p> <p>Did you already try to use Google's <a href="https://developers.google.com/oauthplayground/" rel="nofollow">OAuth 2.0 playground</a>? I was able to successfully access <code>https://content.googleapis.com/content/v1/#{MERCHANT_ID}/items/products/generic</code>.</p> <ol> <li>In "Step 1" I've chosen the "Content API for Shopping" and then authorized the API with my account.</li> <li>Then in "Step 2" I've "exchanged authorization code for tokens", which results in a "refresh token" and an "access token".</li> <li>Then in "Step 3" I've invoked a <code>GET</code> request to <code>https://content.googleapis.com/content/v1/1234567/items/products/generic</code>. Because <code>1234567</code> is not a valid <code>MERCHANT_ID</code> it returns an Error. But the Error Messages contains a <code>MERCHANT_ID</code> which actually belongs to your account.</li> <li>I repeated "Step 3" but now with the correct <code>MERCHANT_ID</code>. Which returns a <code>HTTP/1.1 200 OK</code> with the requested items in the body.</li> </ol> <p>Furthermore I'm not sure, but doesn't Google API expect an Authorization header to be present with the <code>access_token</code> (<code>$gp_token</code>)? Within the <a href="https://developers.google.com/oauthplayground/" rel="nofollow">OAuth 2.0 playground</a> this Authorization header is used to sent the <code>access_token</code>.</p> <p>I also found the Structured Content API demo page (https://google-content-api-tools.appspot.com/demo/demo.html), which is more specific to the Content API for Shopping.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload