-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new command: "clean log v2" #350
Add new command: "clean log v2" #350
Conversation
- requested over "app/dln/api/" api instead "api/" - authentication is updated for use of different api prefix
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #350 +/- ##
==========================================
+ Coverage 78.92% 79.21% +0.28%
==========================================
Files 62 63 +1
Lines 2548 2583 +35
Branches 465 467 +2
==========================================
+ Hits 2011 2046 +35
Misses 494 494
Partials 43 43 ☔ View full report in Codecov by Sentry. |
…anLogV2' into feature/CommandCleanLogV2
"auth": json.dumps( | ||
{ | ||
"with": "users", | ||
"userid": credentials.user_id, | ||
"realm": "ecouser.net", | ||
"token": credentials.token, | ||
"resource": device_info.resource, | ||
} | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that the auth must be passed as query param? Normally the authenticator will add it automatically but in the body...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from what the app sends as request yes, this is the communication captured over mitm:
request:
GET https://api-app.dc-eu.ww.ecouser.net/app/dln/api/log/clean_result/list?did=REPLACED_DID&res=Gy2C&country=DE&size=10&auth=REPLACED_AUTH&version=v2&logType=clean&before=1699152310000&lang=EN&et1=1699152310545&defaultLang=zh_cn&channel=google_play HTTP/2.0
country: DE
accept: application/json
sign: REPLACED_SIGN
userid: REPLACED_USER_ID
token: REPLACED_TOKEN
authorization: Bearer REPLACED_TOKEN
v: 2.4.1
appid: ecovacs
plat: android
lang: EN
content-type: application/json
ts: 1699152310572
ucid: REPLACED_UC_ID
accept-encoding: gzip
user-agent: okhttp/4.9.1
content-length: 0
response:
HTTP/2.0 200
content-type: application/json; charset=utf-8
date: Sun, 05 Nov 2023 02:45:10 GMT
content-length: 40
{"code":0,"message":"success","data":[]}
request as curl:
curl -H 'country: DE' -H 'accept: application/json' -H 'sign: REPLACED_SIGN' -H 'userid: REPLACED_USER_ID' -H 'token: REPLACED_TOKEN' -H 'authorization: Bearer REPLACED_TOKEN' -H 'v: 2.4.1' -H 'appid: ecovacs' -H 'plat: android' -H 'lang: EN' -H 'content-type: application/json' -H 'ts: 1699152310572' -H 'ucid: REPLACED_UC:ID' --compressed -H 'user-agent: okhttp/4.9.1' 'https://api-app.dc-eu.ww.ecouser.net/app/dln/api/log/clean_result/list?did=REPLACED_DID&res=Gy2C&country=DE&size=10&auth=REPLACED_AUTH&version=v2&logType=clean&before=1699152310000&lang=EN&et1=1699152310545&defaultLang=zh_cn&channel=google_play'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happen if we omit the auth in the query params?
Does the request still work?
closed because of not needed, see also https://github.com/DeebotUniverse/Deebot-4-Home-Assistant/discussions/464 |
Add new command: "clean log v2"
app/dln/api/log/clean_result/list