Skip to content

Guide and OAuth helper to generate keys for Chrome Extensions upload

Notifications You must be signed in to change notification settings

fregante/chrome-webstore-upload-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to generate Google API keys

Guide and OAuth helper to generate keys for Chrome Extensions upload

Companion to Chrome Web Store Upload to publish extensions.

You can follow this complete guide or the official-but-partial one at: https://developer.chrome.com/docs/webstore/using-api

Tip

The names you enter here don't really matter. It's an app that only you will have access to. This will take approximately 10 minutes and Google likes to change these screens often. Sorry.

  1. Visit https://console.developers.google.com/apis/credentials

  2. Create a project:

    Google APIs: Create project
  3. Enter chrome-webstore-upload and Create

  4. Visit https://console.cloud.google.com/auth/overview

  5. Click Get started

    OAuth Overview
  6. Enter the Application name (e.g. chrome-webstore-upload) and required email field

    App Information
  7. Select Internal

    Audience selection
  8. Fill in any required fields until Create becomes available

  9. Click Create OAuth client

    OAuth Overview
  10. Select Desktop app, enter Chrome Webstore Upload as the name and click Create

    Create OAuth client ID
  11. Save your ✅ CLIENT_ID

    OAuth client created
  12. Open the "Chrome Webstore Upload" client on screen

    Client ID list
  13. Click the Info button in the top right

    Client ID detail
  14. Save your ✅ CLIENT_SECRET

    Client ID secret
  15. Visit https://console.cloud.google.com/apis/library/chromewebstore.googleapis.com

  16. Click Enable

    CWS API toggle
  17. Run this CLI tool to generate the required refreshToken

    npx chrome-webstore-upload-keys

    or

    bunx chrome-webstore-upload-keys
    chrome-webstore-upload-keys demo
  18. Done. Now you should have ✅ CLIENT_ID, ✅ CLIENT_SECRET and ✅ REFRESH_TOKEN. You can use these for all your extensions, but don't share them!

What the CLI tool does

  1. Prompts you for the two keys you just generated
  2. Opens a local server to handle the OAuth redirect from Google's servers with an approvalCode
  3. Uses Google's oauth2 API to request a refreshToken

About

Guide and OAuth helper to generate keys for Chrome Extensions upload

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors 2

  •  
  •