cp .env.example .envCập nhật .env với thông tin thật:
SHOPEE_API_APP_ID=your_real_app_id
SHOPEE_API_SECRET=your_real_api_secretnpm run startScript sẽ:
- Tạo GraphQL payload.
- Tạo chữ ký SHA256 theo format Authorization của Shopee.
- Gọi endpoint
https://open-api.affiliate.shopee.vn/graphql.
shopeeOfferV2brandOfferV2productOfferV2generateShortLinkconversionReportV2validationReportV2
node index.js shopeeOfferV2
node index.js productOfferV2
node index.js generateShortLink "https://shopee.vn/product/38003654/1589295236"
node index.js conversionReportV2
node index.js validationReportV2npm run lint
npm run test