Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Shopee SDK Documentation

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.

Table of Contents

Getting Started

API Managers

Each manager provides access to a specific set of Shopee API endpoints:

Quick Start

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,
});

Support

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT License - see LICENSE file for details.