chrome-webstore-upload uses the Chrome Web Store API.
Here's how to get its 3 access keys: clientId
, clientSecret
, refreshToken
Note: the names you enter here don't really matter.
-
Visit https://console.developers.google.com/apis/api/chromewebstore/overview
-
Create a project:
-
Enter a name (e.g.
webstore-yourextensionname
) -
Visit https://console.developers.google.com/apis/api/chromewebstore/overview again
-
Enable the API:
-
Open Credentials > Create credentials > OAuth client ID:
-
Click on Configure consent screen:
-
Enter a product name (e.g.
yourextensionname
) and save -
Select Other and click Create
-
Save your ✅
clientId
and ✅clientSecret
, these are your keys. -
Place your
clientId
in this URL and open it:https://accounts.google.com/o/oauth2/auth?client_id=YOUR_CLIENT_ID&response_type=code&scope=https://www.googleapis.com/auth/chromewebstore&redirect_uri=urn:ietf:wg:oauth:2.0:oob
-
Follow its steps and copy the
authcode
it shows on the last page: -
Run this in your browser console.
It's a wizard to create and copy acurl
into your clipboard:copy(`curl "https://accounts.google.com/o/oauth2/token" -d "client_id=${encodeURIComponent(prompt('Enter your clientId'))}&client_secret=${encodeURIComponent(prompt('Enter your clientSecret'))}&code=${encodeURIComponent(prompt('Enter your authcode'))}&grant_type=authorization_code&redirect_uri=urn:ietf:wg:oauth:2.0:oob"`);alert('The curl has been copied. Paste it into your terminal.')
-
Paste the generated code in your terminal and run it.
-
Save your ✅
refreshToken
: -
Done. Now you should have ✅
clientId
, ✅clientSecret
and ✅refreshToken
. You can use these for all your extensions, but don't share them!