
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
chrome-web-store-api
Advanced tools
Chrome Web Store API client for Node.js
npm install chrome-web-store-api
Refer to this page to get the response of credentials and access token.
Set that value in an environment variable.
CHROME_WEB_STORE_API_CREDENTIAL
CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE
For example:
export CHROME_WEB_STORE_API_CREDENTIAL=$( cat <<EOF | tr -d ' \r\n'
{
"installed": {
"client_id": "999999999999-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
"project_id": "foo-bar-baz",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "abcdefghijklmnopqrstuvwx",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
]
}
}
EOF
)
export CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE=$(cat <<EOF | tr -d ' \r\n'
{
"access_token": "vpvEyHWpX^{CQC`fREmnwCHb`ejN`ox^XxEbYDKXmghM`]lrL{ddTrxdgtgLEvAeX\oP]NkRgjFcvNE_enJZI`BNcvZScQOA\BAA|NSzB_Xg_ie_yXLrQ[sII_]r|jW{nzZULNP",
"expires_in": 3599,
"refresh_token": "riM{R[Lir|hyHT|DNeWZhQzVpOjvTbTMayHZdfNFlR{TB]KFSh^DyjNZySyj|aWYajb]dNCIRTZXmKKuB`bbUyoLRGkPWao|pibdNSk",
"scope": "https://www.googleapis.com/auth/chromewebstore",
"token_type": "Bearer"
}
EOF
)
For example:
const ChromeWebStore = require('chrome-web-store-api');
const fs = require('fs');
const chromeWebStore = new ChromeWebStore(
JSON.parse(process.env.CHROME_WEB_STORE_API_CREDENTIAL || ''),
JSON.parse(process.env.CHROME_WEB_STORE_API_ACCESS_TOKEN_RESPONSE || ''),
);
const itemId = 'ID of your Chrome extension';
const packageFile = 'your-chrome-extension.zip';
(async () => {
try {
const item = await (new chromeWebStore.Item(itemId)).fetch();
{
const readStream = fs.createReadStream(packageFile);
const result = await item.upload(readStream);
if (result.uploadState === 'FAILURE') {
const message = (result.itemError || []).map(error => error.error_detail).join('\n');
throw new Error(message);
}
console.log('Upload succeeded.');
}
{
const result = await item.publish();
(result.statusDetail || []).forEach(detail => console.log(detail));
}
} catch (error) {
console.error(error);
}
})();
Bug reports and pull requests are welcome on GitHub at https://github.com/naokikimura/chrome-web-store-api
The gem is available as open source under the terms of the MIT License.
FAQs
Chrome Web Store API client for Node.js
The npm package chrome-web-store-api receives a total of 3 weekly downloads. As such, chrome-web-store-api popularity was classified as not popular.
We found that chrome-web-store-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.