shopee-sdk

A lightweight, fully-featured TypeScript SDK for the Shopee Open API v2. Features automatic request signing, pluggable token storage, robust error handling, and

What is shopee-sdk?

A lightweight, fully-featured TypeScript SDK for the Shopee Open API v2. Features automatic request signing, pluggable token storage, robust error handling, and 100% endpoint coverage.

Overview of shopee-sdk

What it is

Shopee SDK is a lightweight, fully-featured TypeScript SDK for the Shopee Open API v2. It provides automatic request signing, pluggable token storage, robust error handling, and 100% endpoint coverage. The SDK is open source under the MIT license and is designed for production use.

Key features

  • Automatic request signing and token refresh
  • Pluggable token storage (file-based included, custom solutions supported)
  • Robust error handling with built-in retry logic
  • 100% coverage of all Shopee API endpoints across 30 API managers
  • Full TypeScript definitions for type safety and autocomplete
  • Multi-region support for all 12 Shopee regions
  • Zero dependencies except node-fetch

Use cases

  • Multi-channel e-commerce platforms – sync inventory, orders, and products across sales channels
  • Analytics dashboards – track sales performance and business metrics
  • Automation tools – automate order processing, inventory updates, and customer communications
  • ERP integrations – connect Shopee with existing business systems
  • Mobile apps – build native shop management experiences
  • Marketing automation – manage promotions, vouchers, and advertising campaigns programmatically

Getting started

Install the package:bashnpm install @congminh1254/shopee-sdkRequirements: Node.js >= 20.0.0Quick start example:```typescriptimport { ShopeeSDK, ShopeeRegion } from '@congminh1254/shopee-sdk';const sdk = new ShopeeSDK({ partner_id: 123456, partner_key: 'your-partner-key', region: ShopeeRegion.GLOBAL, shop_id: 789012,});const authUrl = sdk.getAuthorizationUrl('https://your-app.com/callback');console.log('Visit:', authUrl);await sdk.authenticateWithCode('auth-code-from-callback');const products = await sdk.product.getItemList({ offset: 0, page_size: 20 });const orders = await sdk.order.getOrderList({ time_range_field: 'create_time', time_from: Math.floor(Date.now() / 1000)

  • 86400, time_to: Math.floor(Date.now() / 1000), page_size: 50,});```

License and pricing

License: MIT. The SDK is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/congminh1254shopee-sdk.svg)](https://yunodb.com/tools/congminh1254shopee-sdk?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/congminh1254shopee-sdk?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/congminh1254shopee-sdk.svg" alt="Featured on YunoDB" height="20"></a>