Medusa v2 plugin to sync Medusa products to a personal Etsy shop account via the Etsy Open API v3.
A Medusa v2 plugin that syncs your Medusa products to a personal Etsy shop via the Etsy Open API v3. It handles the OAuth2 (PKCE) connect flow, draft-listing creation, listing updates, image uploads, and keeps a per-product sync record so you can publish to Etsy from the Medusa Admin.
1npm install @jytextiles/medusa-plugin-etsy-sync2# or3yarn add @jytextiles/medusa-plugin-etsy-sync4# or5pnpm add @jytextiles/medusa-plugin-etsy-syncRegister the plugin in :
1module.exports = defineConfig({2 // ...3 plugins: [4 {5 resolve: "@jytextiles/medusa-plugin-etsy-sync",6 options: {7 keystring: process.env.ETSY_KEYSTRING,8 sharedSecret: process.env.ETSY_SHARED_SECRET,9 redirectUri:10 process.env.ETSY_REDIRECT_URI ??11 "http://localhost:9000/app/settings/oauth/etsy/callback",12 scope:13 process.env.ETSY_SCOPE ?? "listings_r listings_w listings_d shops_r",14 },15 },16 ],17})Options can be supplied via the object above or the matching environment variables (env takes precedence):
| Option | Env var | Required | Description |
|---|---|---|---|
| yes | Your Etsy app's keystring (API key). | ||
| yes | Your Etsy app's shared secret. | ||
| no | OAuth callback URL. Must match your Etsy app's registered callback. | ||
| no | Space-separated Etsy OAuth scopes. |
Add the callback URL () to your Etsy app's allowed redirect URIs in the Etsy developer portal.
After installing, run your project's migrations so the plugin's tables are created:
npx medusa db:migrate| Method | Route | Purpose |
|---|---|---|
| GET | Connection + readiness status | |
| GET / POST | Read / save sync settings | |
| GET | Start the OAuth2 PKCE flow | |
| GET | OAuth2 callback | |
| POST | Disconnect the shop | |
| POST | Sync a single product | |
| POST | Sync multiple products | |
| GET | List sync records | |
| GET | Etsy taxonomy lookup | |
| GET | Etsy shipping profiles | |
| GET | Etsy return policies |
1# Build the plugin (compiles to .medusa/server)2npm run build3
4# Watch mode while developing against a local Medusa app5npm run dev6
7# Generate a migration after changing a model8npm run db:generate9
10# Run tests11npm run test