Before you can begin making REST calls against the Chrome Web Store, you will need to enable the Chrome Web Store API, configure your OAuth consent screen, and retrieve your API access keys.
- Follow the instructions provided on https://developer.chrome.com/docs/webstore/using-api.
- This should provide you with a
CHROME_CLIENT_ID
and aCHROME_CLIENT_SECRET
. Add these to your.env
. Add theCHROME_SUCCESS_CODE
to your clipboard. - Run the following command with your credentials
curl "https://accounts.google.com/o/oauth2/token" -d \ "client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&code={{CHROME_SUCCESS_CODE}}&grant_type=authorization_code&redirect_uri=urn:ietf:wg:oauth:2.0:oob"
- Store the refresh_token in
.env
asCHROME_REFRESH_TOKEN
. - Optional: If your Chrome Extension is already published, store your
CHROME_EXTENSION_ID
in the.env
too.
You can now use the commands to add, update, publish and check the status of your Chrome Extension! 🚀
These are the scripts available to use the Chrome Web Store API.
bun chrome:store
Init
- Add your extension to the store for the first time.
- Requires a valid build in "/dist/chrome-extension.zip".
Status
- Checks the status of your extension in the store.
- Requires a valid
CHROME_EXTENSION_ID
to be set in the.env
.
Update
- Updates your extension in the store.
- Requires a valid build in "/dist/chrome-extension.zip" and a valid
CHROME_EXTENSION_ID
to be set in the.env
.
Publish
- Publishes your extension in the store to all users.
- Requires a valid build in "/dist/chrome-extension.zip" and a valid
CHROME_EXTENSION_ID
to be set in the.env
.
Requirements
- Requires a valid build in "/dist/chrome-extension.zip"
- Requires a valid
CHROME_EXTENSION_ID
to be set in the .env
Before you can begin making REST calls against the Firefox Add-Ons enviromnent, you will need to generate your API access keys.
- Follow the instructions provided on https://addons-server.readthedocs.io/en/latest/topics/api/auth.html
- This should provide you with a
FIREFOX_JWT_ISSUER
and aFIREFOX_JWT_SECRET
. Add these to your.env
. - Randomly generate a value and store it as the
FIREFOX_JWT_ID
. - Optional: If your Firefox Extension is already published, store your
FIREFOX_EXTENSION_ID
in the.env
too.
You can now use the commands to add, update, publish and check the status of your Chrome Extension! 🚀
These are the scripts available to use the Firefox Add-Ons API.
bun firefox:store
Update
- Update your extension in the Firefox Add-Ons Store
- Requires a valid build in "/dist/chrome-extension.zip".
Status
- Checks the status of your extension in the store.
- Requires a valid
FIREFOX_EXTENSION_ID
to be set in the.env
.
Publish
- Publishes your extension in the store to all users.
- Requires a valid build in "/dist/chrome-extension.zip" and a valid
FIREFOX_EXTENSION_ID
to be set in the.env
.
Requirements
- Requires a valid build in "/dist/chrome-extension.zip"
- Requires a valid
CHROME_EXTENSION_ID
to be set in the .env
https://addons-server.readthedocs.io/en/latest/topics/api/index.html
https://blog.mozilla.org/addons/2022/03/17/new-api-for-submitting-and-updating-add-ons/