Reputation: 75
I'm trying to automate the deploy process of a Chrome Extension to Chrome Web Store, but kind of got suck before even really started. This article describe the API to publish and update items in the Chrome Web Store.
What I don't get is how to enable the Chrome Web Store API, it says that it shall be enabled from the Google developers console, but there I cannot find the items I have listed in the Chrome Web Store, just other stuff like my appengine applications. And in the Chrome Web Store Developer Dashboard (where I usually edits and updates my Web Store listings) I cannot find anything about enabling any API.
Any tips? Shall my listings on the Chrome Web Store and the Google developers console be connected somehow?
Upvotes: 5
Views: 1734
Reputation:
You don't have to 'link' your Web Store items with the Google Developers Console, you only need to push your project from the Developers Console to the Web Store and include your App ID. Quoting from the site https://developer.chrome.com/webstore/using_webstore_api:
Uploading a package to update an existing store item:
Endpoint: https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID
Type: PUT
Header Parameters: $TOKEN: the access token
Body content: the package file to upload
$APP_ID is the ID of the existing Web Store item.
> curl \
-H "Authorization: Bearer $TOKEN" \
-H "x-goog-api-version: 2" \
-X PUT \
-T $FILE_NAME \
-v \
https://www.googleapis.com/upload/chromewebstore/v1.1/items/$APP_ID
Example:
First you need to make a new project or import an existing one in the Developers Console, i linked my project from GitHub so the Developers Console is always synced up with that repository. You can do this under the Source Code tab in the Developers Console.
Make sure that the owner of the Developers Account is the same gmail account as your Web Store account to make things easy. Also check if the Chrome Web Store API is 'ON' in the APIs tab under 'APIs & auth'. Under credentials you need to get your Client ID and secret in order to get a code to change for an access token. This is all very well explained in the walk-through from Google.
Try to install curl (http://curl.haxx.se/), this will help you with the POST and GET in the command prompt. (Examples are also in the walk-through)
Upvotes: 2
Reputation: 77523
Shall my listings on the Chrome Web Store and the Google developers console be connected somehow?
No, they are not connected.
You should just make a new project there and enable the API access from it (to obtain API keys).
Upvotes: 2