JSPM

chrome-webstore-upload-keys

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 440
  • Score
    100M100P100Q93962F
  • License MIT

CLI tool to generate OAuth keys for the Chrome Web Store

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chrome-webstore-upload-keys) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    How to generate Google API keys

    Guide and OAuth helper to generate keys

    Companion to Web Store Upload.

    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/apis/credentials/consent

    5. Select on External and Create

      OAuth Consent Screen
    6. Only enter the Application name (e.g. chrome-webstore-upload) and required email fields, and click Save

      Consent screen configuration
    7. On the 3rd screen, add your own email address:

      Test users selection
    8. Visit https://console.developers.google.com/apis/library/chromewebstore.googleapis.com

    9. Click Enable

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

    11. Click Create credentials > OAuth client ID:

      Create credentials
    12. Select Desktop app, enter Chrome Webstore Upload and click Create

      Create OAuth client ID
    13. Save your ✅ clientId and ✅ clientSecret:

      OAuth client created
    14. Visit https://console.cloud.google.com/apis/credentials/consent

    15. Click PUBLISH APP and confirm

      Publish app
    16. 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
    17. Done. Now you should have ✅ clientId, ✅ clientSecret and ✅ refreshToken. You can use these for all your extensions, but don't share them!

    What the CLI tool does

    1. Requests the two keys you have
    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