Chrome Extension Chrome Web Store API — Developer Guide

2 min read

Chrome Web Store Publish API

Introduction

Prerequisites

Setting Up API Access

  1. Go to Google Cloud Console -> APIs & Services -> Enable “Chrome Web Store API”
  2. Create OAuth2 credentials (Desktop app type)
  3. Get refresh token using authorization flow:
    # Authorization URL
    https://accounts.google.com/o/oauth2/auth?response_type=code&scope=https://www.googleapis.com/auth/chromewebstore&client_id=CLIENT_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob
    
  4. Exchange code for refresh token

API Endpoints

Upload a New Version

curl -X PUT \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "x-goog-api-version: 2" \
  -T extension.zip \
  "https://www.googleapis.com/upload/chromewebstore/v1.1/items/EXTENSION_ID"

Publish an Extension

curl -X POST \
  -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "x-goog-api-version: 2" \
  -H "Content-Length: 0" \
  "https://www.googleapis.com/chromewebstore/v1.1/items/EXTENSION_ID/publish"

Get Extension Info

curl -H "Authorization: Bearer ACCESS_TOKEN" \
  -H "x-goog-api-version: 2" \
  "https://www.googleapis.com/chromewebstore/v1.1/items/EXTENSION_ID?projection=DRAFT"

CI/CD Integration

GitHub Actions Workflow

npm Script Automation

Publishing to Specific Channels

Version Management with the API

Error Handling

Rate Limits

Security Best Practices

Part of the Chrome Extension Guide by theluckystrike. Built at zovo.one.