Shopee Token Manager

Secure OAuth Token Management API

API Documentation

Shopee OAuth Token Management

Enterprise-grade API for managing Shopee seller access tokens with automatic refresh, company-scoped access control, and comprehensive audit logging.

Secure by Design

Multi-layer security with API key authentication, company-scoped access, and shop ownership verification. All tokens encrypted at rest.

Auto Token Refresh

Intelligent queue-based refresh system ensures tokens are always valid. Automatic retry with exponential backoff for reliability.

Full Audit Trail

Complete logging of all API access attempts with IP tracking, timestamps, and success/failure reasons for compliance.

How It Works

1

OAuth Authorization

Sellers authorize your application through Shopee OAuth flow. Initial access and refresh tokens are stored securely.

2

Company Registration

Register your company and receive an API key. Map which shops your company can access for security isolation.

3

Token Retrieval

Call our API with your API key, company ID, and shop ID to receive a valid access token. Cached for performance.

4

Automatic Maintenance

Our system automatically refreshes tokens before expiration. You always get valid tokens without manual intervention.

Security Layers

API Key Authentication

SHA-256 hashed keys with expiration and revocation support

Company Scoping

Each API key is bound to a single company

Shop Authorization

Explicit mapping of which companies can access which shops

Rate Limiting

Per-company rate limits to prevent abuse

Encrypted Storage

All tokens and sensitive data encrypted at rest

Comprehensive Logging

All access attempts logged with IP, timestamp, and outcome

Quick Start

1. Get Your API Key

Contact the administrator to register your company and receive an API key.

2. Make Your First Request

curl -X POST https://token.acsell.ai/api/v1/tokens/access \
  -H "X-API-Key: ak_prod_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "company_id": "your-company-uuid",
    "shop_id": 123456789
  }'

3. Handle the Response

{
  "success": true,
  "data": {
    "access_token": "shopee_access_token_here",
    "expires_at": "2025-10-27T18:00:00Z",
    "shop_id": 123456789
  }
}

Available Endpoints

POST/api/v1/tokens/access

Get access token for a shop (Company Scoped)

GET/api/tokens/shop/:shopId

Get access token for a shop (Legacy)

GET/api/tokens/merchant/:merchantId

Get access token for a merchant (Legacy)

GET/api/admin/stats

Get system statistics and monitoring data