How do I enable the Chrome Web Store Publishing API?

I'm trying to automate the process of deploying a Chrome extension in the Chrome Web Store, but it kind of sucks before it really starts. This article describes the API for publishing and updating items in the Chrome Web Store.

I donโ€™t understand how to enable the Chrome Web Store API, it says that it should be enabled from the Google Developers Console , but there I can not find the elements that I listed in the Chrome Web Store, as well as other things, such as applications appengine. And in the Chrome Web Storeโ€™s developer toolbar (where I usually edit and update my listings in the online store) I canโ€™t find anything about enabling any API.

Any tips? Should my listings on the Chrome Web Store and Google Developer Console be linked?

+5
source share
2 answers

Should my listings on the Chrome Web Store and Google Developer Console be linked?

No, they are not connected.

You just need to create a new project there and enable API access to it (to get the API keys).

+1
source

You do not need to โ€œlinkโ€ your products in the web store with the Google Developers Console, you just need to pull your project from the Developer Console into the web store and include your application identifier. Quote from the site https://developer.chrome.com/webstore/using_webstore_api :

Download a package to update an existing storage 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 identifier of an 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 create a new project or import an existing one in the Developer Console, I linked my project with GitHub so that the Developer Console always synchronizes with this repository. You can do this on the Source Code tab in the developers console.

Make sure that the owner of the developer account is the same Gmail account as your Web Store account to simplify the task. Also check if the Chrome Web Store API is 'ON' on the API tab under "API and auth". Under the credentials, you must get your client ID and secret in order to get the code to access the access token. All of this is very well explained in the transition from Google.

Try installing curl ( http://curl.haxx.se/ ), this will help you with POST and GET on the command line. (Examples are also in the walkthrough)

+1
source

Source: https://habr.com/ru/post/1212914/


All Articles