Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tiktok-shop
Advanced tools
Readme
Generate "signature" and "token" for Tiktok Shop.
I am very happy and grateful for everyone's help. These meaningful contributions will greatly help me in expanding the useful library to help people.
Paypal: https://paypal.me/tudinhacoustic
Installation is done using the
npm install
command:
$ npm install tiktok-shop
const tiktokShop = require('tiktok-shop')
// Example Url.
// The package helps reorder the parameters and remove keys as Tiktok Shop's instructions.
const url = 'https://open-api.tiktokglobalshop.com/order/202309/orders?access_token=ROW_CBxxx&app_key=6a6xxx&ids=5779xxx&shop_cipher=ROW_Y-vWxxx&shop_id=×tamp=1697708762&version=202309';
const appSecret = '4ebxxx';
const signature = tiktokShop.signByUrl(url, appSecret);
console.info(signature);
Response Data
{
signature: '96f15922fbacd220cea0d8370ba7dff2273674f2a2856868b7e32f7d98da0efe',
timestamp: 1697540200
}
const tiktokShop = require('tiktok-shop')
// Extract all query param EXCEPT ' sign ', ' access_token ', You do not need to reorder the params based on alphabetical order.
const config = {
app_key: 'yourAppKey', // Required
app_secret: 'yourAppSecret', // Required
shop_id: 'yourShopId', // Optional
shop_cipher: 'yourShopCipher', // Optional
version: '202306', // Default: 202212
}
// Tiktok API name, more detail: https://partner.tiktokshop.com/dev/api-testing-tool
const path = '/api/orders/search';
const signature = tiktokShop.signature(config, path);
console.info(signature);
Response Data
{
signature: '96f15922fbacd220cea0d8370ba7dff2273674f2a2856868b7e32f7d98da0efe',
timestamp: 1697540200
}
const tiktokShop = require('tiktok-shop')
// Extract all query param EXCEPT ' sign ', ' access_token ', You do not need to reorder the params based on alphabetical order.
const config = {
app_key: 'yourAppKey', // Required
app_secret: 'yourAppSecret', // Required
}
// How to get Auth Code: https://partner.tiktokshop.com/doc/page/63fd743c715d622a338c4e5a
const authCode = 'yourAuthCode';
const accessToken = await tiktokShop.authCodeToken(config, authCode);
console.info(accessToken);
Response Data
{
"access_token": "ROW_-3_uKAAAAADYdCab***",
"access_token_expire_in": 1696992654,
"refresh_token": "ROW_RBHCjwAAAACgH1O***",
"refresh_token_expire_in": 4818450857,
"open_id": "D3MazQAAAAAi5AmxAvxkSaBRs***",
"seller_name": "Test",
"seller_base_region": "VN",
"user_type": 0
}
const tiktokShop = require('tiktok-shop')
// Extract all query param EXCEPT ' sign ', ' access_token ', You do not need to reorder the params based on alphabetical order.
const config = {
app_key: 'yourAppKey', // Required
app_secret: 'yourAppSecret', // Required
}
const refreshToken = 'yourRefreshToken';
const accessToken = await tiktokShop.generateToken(config, refreshToken);
console.info(accessToken);
Response Data
{
"access_token": "ROW_-3_uKAAAAADYdCab***",
"access_token_expire_in": 1696992654,
"refresh_token": "ROW_RBHCjwAAAACgH1O***",
"refresh_token_expire_in": 4818450857,
"open_id": "D3MazQAAAAAi5AmxAvxkSaBRs***",
"seller_name": "Test",
"seller_base_region": "VN",
"user_type": 0
}
FAQs
Generate "signature" and "token" for Tiktok Shop.
The npm package tiktok-shop receives a total of 6 weekly downloads. As such, tiktok-shop popularity was classified as not popular.
We found that tiktok-shop demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.