Skip to content

rlogank/etsy-api-toolkit

Repository files navigation

Etsy API Toolkit

Small Python scripts for Etsy v3 API automation.

Included:

  • etsy_oauth.py: local PKCE OAuth flow and token refresh helper
  • etsy_api.py: lightweight Etsy API client with JSON, form, and multipart upload support
  • etsy_snapshot.py: capture shop/listing snapshots for planning
  • etsy_apply_plan.py: apply listing/section updates from a JSON plan
  • etsy_reprice_free_shipping.py: update listing prices for free-shipping experiments
  • publish_to_etsy.py: create draft listings and upload files/images from a manifest

These scripts use only the Python standard library.

Setup

cp .env.example .env

Fill in:

  • ETSY_KEYSTRING
  • ETSY_SHARED_SECRET
  • ETSY_SHOP_ID

Then authorize:

python3 etsy_oauth.py authorize

Etsy requires an HTTPS redirect URI. The OAuth helper creates a temporary local self-signed cert for https://localhost:3000/oauth/redirect; add that redirect URI in your Etsy developer app settings.

Refresh later:

python3 etsy_oauth.py refresh

Common commands

Capture a local snapshot:

python3 etsy_snapshot.py --spec etsy_growth_plan.json --out-dir data/snapshots

Apply a plan with a dry run first:

python3 etsy_apply_plan.py --spec etsy_growth_plan.json --dry-run

Publish from a manifest:

python3 publish_to_etsy.py manifest.json

Security

Do not commit .env, generated local cert/key files, snapshots, receipts, or exported customer/order data. The .gitignore excludes those by default.

If you adapt these scripts from a private shop automation folder, rotate any tokens that were ever committed or shared.

About

Small Python toolkit for Etsy v3 API OAuth, snapshots, listings, and uploads

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages