get ad\token\device_id in file: .login
npm pnpm i
node login.js
or
npm run login
npm run logout
or delete .login file
const login = require('./login')
console.log('start')
const f = await login.asyncLogin();
if (!f) {
console.log('login failed')
return
}
if (f) {
console.log('login success')
}
const {ad, token, device_id} = await login.adToken();
console.log(ad, token, device_id)
{
await login.logout()
let {ad, token, device_id} = await login.adToken();
console.log(ad, token, device_id)
}
const login = require('./login')
console.log('start')
const f = await login.asyncLogin('https://test.***.com');
if (!f) {
console.log('login failed')
return
}