Welcome to the comprehensive documentation for the Shopee SDK! This guide will help you get started with integrating Shopee's Open API into your application.
- Setup Guide - Installation, configuration, and initialization
- Authentication - OAuth flow and token management
- Token Storage - Managing access tokens
- Proxy Configuration - Using HTTP/HTTPS proxies
Each manager provides access to a specific set of Shopee API endpoints:
- AuthManager - Authentication and token operations
- ProductManager - Product catalog management
- OrderManager - Order processing and fulfillment
- LogisticsManager - Shipping and tracking
- PaymentManager - Payment and escrow information
- VoucherManager - Discount voucher management
- ReturnsManager - Return and refund request management
- PushManager - Webhook and push notification configuration
- PublicManager - Public API endpoints (no auth required)
- AdsManager - Advertising campaign management
- AccountHealthManager - Account performance analytics
- MerchantManager - Merchant information, warehouses, and shop management
- ShopManager - Shop information and profile management
- MediaManager - Image and video upload operations
- MediaSpaceManager - Media file uploads (images and videos)
- GlobalProductManager - Global product management
- FirstMileManager - First mile logistics operations
- DiscountManager - Discount promotion campaigns
- BundleDealManager - Bundle deal promotions
- AddOnDealManager - Add-on deal promotions
- ShopFlashSaleManager - Flash sale campaigns
- FollowPrizeManager - Follow prize activities
- TopPicksManager - Top picks product collections
- ShopCategoryManager - Shop category management
- SbsManager - Shopee Business Services (SBS) warehouse inventory management
import { ShopeeSDK, ShopeeRegion } from '@congminh1254/shopee-sdk';
// Initialize the SDK
const sdk = new ShopeeSDK({
partner_id: 123456,
partner_key: 'your-partner-key',
region: ShopeeRegion.GLOBAL,
shop_id: 789012, // Optional: for shop-level operations
});
// Authenticate and get authorization URL
const authUrl = sdk.getAuthorizationUrl('https://your-app.com/callback');
console.log('Visit this URL to authorize:', authUrl);
// After user authorizes, exchange code for token
await sdk.authenticateWithCode('auth-code-from-callback');
// Use the SDK
const products = await sdk.product.getItemList({
offset: 0,
page_size: 20,
});We welcome contributions! Please see our Contributing Guide for details.
MIT License - see LICENSE file for details.