Is it possible to auto-update a chrome extension published on the chrome web store?

后端 未结 2 1132
一生所求
一生所求 2021-02-19 23:17

The docs are very unclear about this. I get that you can autoupdate your extension by bumping the version number if you self host your extension. However what I don\'t know is i

相关标签:
2条回答
  • 2021-02-19 23:47

    When you publish to Chrome Web Store (CWS), CWS hosts your extension and you loose control over update_url attribute in manifest.json (it's overriten by CWS specific link). When you decide to make new version of your CWS-hosted extension available, you simply upload it (with higher version number) to CWS (via developer dashboard). After that, you just wait for Chrome auto-update feature to do all the work.

    Each Chrome performs, in the background and without users direct permission, a routine checks in CWS (or somewhere else if extension is self-hosted) making sure that all extensions are up to date. If new version of any extension (or app) is available, Chrome performs an auto-update (if extension's permissions haven't increased).

    0 讨论(0)
  • 2021-02-19 23:52

    There is now a way to update extensions hosted in CWS programmatically (since March 2014) by using Webstore API.

    After registering for the API and authorizing through OAuth 2.0, you can push an update for an existing 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
    

    Documentation is not clear whether this creates a draft or not; in any case, publishing is also possible through the API.

    Please note that it will still be subject to automatic review checks, so the actual update will only be available after they complete (usually under an hour).

    0 讨论(0)
提交回复
热议问题