Comments (3)
const nonce = require('nonce')();
const { makeFakeIMEI } = require('../ewelink-helper');
const credentialsPayload = ({ email, password }) => {
let body = {
password,
version: 6,
ts: ${Math.round(new Date().getTime() / 1000)}
,
nonce: ${nonce()}
,
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
imei: makeFakeIMEI(),
os: 'iOS',
model: 'iPhone10,6',
romVersion: '11.1.2',
appVersion: '3.5.3',
}
// use phoneNumber field is ok
// I want to change email to username
if(email.includes('@')){
body['email'] = email
}else{
body['phoneNumber'] = email
}
console.log(body)
return body
};
module.exports = credentialsPayload;
from ewelink-api.
+1 for this, but the key name phoneNumber
since incorrect.
from ewelink-api.
this was done on v3.0.0
from ewelink-api.
Related Issues (20)
- Unable to install on Raspberry Pi
- THR316 doesn't update
- Unable to use power consumption with sonoff POW Elite HOT 6
- Get Voltage and current on POWR2 device HOT 2
- CoolkIt: Announcement regarding the expiration of the APPID referenced in this project and the cessation of maintenance of the v1 interface, suggesting migration HOT 7
- Error 401: Wrong account or password -- again HOT 54
- Error: 406 { error: 406, msg: 'Authentication failed' } HOT 21
- Support for changing the network indicator led?
- Is There Any PHP Version HOT 1
- error: 401, msg: 'Wrong account or password'
- Sonoff Dual R3 - Power Consumption Issue HOT 1
- Retrieve Room Names
- Reading the list of shared devices
- Switch to manual or automatic mode
- websocket closes unexpectedly, causing Node Red to crash
- { error: 406, msg: 'Authentication failed' } I am using right email and password HOT 3
- Yyy
- How can I change the wifi password of the device registered to ewelink with js? Like OTA bin codes
- sonoff dimmer device control js code ???
- multichannel devices, set/get powerstate inconsitent behavior
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ewelink-api.