SwammiM
SwammiM

Reputation: 513

Google Content API - Not a valid origin for the client

I'm struggling with Google's Content API.

I created a key on the authentication tab of the Merchant Center, as described here : https://developers.google.com/shopping-content/guides/quickstart/setting-up-a-client-library

This downloads a JSON file (content-api-key.json) but doesn't seem to add anything to the dashboard.

Next, I went to one of the API docs pages and copy pasted the JavaScript code it autogenerates. I replaced YOUR_API_KEY with private_key from the JSON file (should I use private_key_id instead?), and YOUR_CLIENT_ID with client_id.

When opening the file in the browser, I'm greeted with this lovely error message :

"Not a valid origin for the client: XXXX has not been whitelisted for client ID YYYY. Please go to https://console.developers.google.com/ and whitelist this origin for your project's client ID."

When I go to the developer console like they suggested, I don't see any projects related to the merchant center account I'm working on (which I have admin rights to).

So I created a new project in the developer console, but I have no idea how to link that project to the right merchant center project, or to the key that I downloaded.

So the question is, how do I whitelist a URL for the generated key (content-api-key.json)?

Upvotes: 1

Views: 263

Answers (0)

Related Questions