Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Tesla: put proxy token into X-Authorization#18962

Merged
andig merged 6 commits intomasterfromfeat/mta-token
Feb 21, 2025
Merged

Conversation

andig
Copy link
Member

Fix#18815

/cc@jlestel

@naltatis könntest Du das bitte testen?

@andigandig added the vehiclesSpecific vehicle support labelFeb 19, 2025
@naltatis
Copy link
Member

@jlestel should setting both headers already work right now? I'm gettingInvalid API key.

[tesla ] TRACE 2025/02/19 19:38:58 POST https://api.myteslamate.com/api/1/vehicles/5Y...50/command/set_charging_amps[tesla ] TRACE 2025/02/19 19:39:00 POST /api/1/vehicles/5Y...50/command/set_charging_amps HTTP/1.1Host: api.myteslamate.comUser-Agent: Go-http-client/1.1Content-Length: 21Accept: application/jsonAuthorization: Bearer ***Content-Type: application/jsonX-Authorization: Bearer ***Accept-Encoding: gzip{"charging_amps": 16}HTTP/2.0 401 UnauthorizedConnection: closeAccess-Control-Allow-Origin: *Alt-Svc: h3=":443"; ma=86400Cache-Control: no-cache, privateCf-Cache-Status: DYNAMICCf-Ray: 914860849efcd6c7-IADContent-Type: application/jsonDate: Wed, 19 Feb 2025 18:39:00 GMTNel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=rYpGWbZbgdngtO6EKRq%2B1HaoQSKSvKFCIFd8u1Rqrc%2F%2FD%2BwhTRCkzbUr3RP%2F1CZ%2BwfE9I5yucLmhqQk8ZT2Rp9uD9jX2VT59vxtetlTgyk4GtVLHfuRrCwCc1I5SOUIHO3zaseML"}],"group":"cf-nel","max_age":604800}Server: cloudflareServer-Timing: cfL4;desc="?proto=TCP&rtt=232903&min_rtt=206812&rtt_var=78877&sent=8&recv=13&lost=0&retrans=0&sent_bytes=4299&recv_bytes=2917&delivery_rate=12794&cwnd=35&unsent_bytes=0&cid=881e50f7a95c5de6&ts=1549&x=0"Vary: AuthorizationX-Ratelimit-Limit: 60X-Ratelimit-Remaining: 55{"error":"Invalid API key"}

@naltatisnaltatis marked this pull request as draftFebruary 19, 2025 18:42
@jlestel
Copy link

@jlestel should setting both headers already work right now? I'm gettingInvalid API key.

This is normal, I haven't implemented it yet. I'll publish it as soon as possible. I'll let you know here when it's done.

@andig
Copy link
MemberAuthor

@naltatis couldn‘t check yet. Imho we should just use the „other transport as base, not create a new pne. I‘ve probably just picked the wrong transport. Will check tomorrow…

@jlestel much appreciated, thank you!

@jlestel
Copy link

Implentation done. You can re-try it now@naltatis

@naltatis
Copy link
Member

Works.@jlestel thanks for the quick reaction!

@andig feel free to refactor the transport. I can retry if you like afterwards.

[tesla ] TRACE 2025/02/19 20:24:06 POST https://api.myteslamate.com/api/1/vehicles/5Y...50/command/set_charging_amps[tesla ] TRACE 2025/02/19 20:24:08 POST /api/1/vehicles/5Y...50/command/set_charging_amps HTTP/1.1Host: api.myteslamate.comUser-Agent: Go-http-client/1.1Content-Length: 21Accept: application/jsonAuthorization: Bearer ***Content-Type: application/jsonX-Authorization: Bearer ***Accept-Encoding: gzip{"charging_amps": 16}HTTP/2.0 200 OKAccess-Control-Allow-Origin: *Alt-Svc: h3=":443"; ma=86400Cache-Control: no-cache, privateCf-Cache-Status: DYNAMICCf-Ray: 9148a29e9b9682ce-IADContent-Type: application/jsonDate: Wed, 19 Feb 2025 19:24:08 GMTNel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=li22Ym4aXLcsVAHuxWj890ExvgKd2GvVoQ%2FbRzSzeQAK0hLgHQ11Ndf%2BUHQei09iWUmAASr9pz%2FL6VQpg0M9%2BzRWTGcktNQzhd4WouPdPf7bPRzktpbs4yrhjr6aK0bBjoMSXPdd"}],"group":"cf-nel","max_age":604800}Server: cloudflareServer-Timing: cfL4;desc="?proto=TCP&rtt=212369&min_rtt=192943&rtt_var=72293&sent=8&recv=13&lost=0&retrans=0&sent_bytes=4300&recv_bytes=2929&delivery_rate=19646&cwnd=35&unsent_bytes=0&cid=44a5c9b584079a25&ts=2006&x=0"Vary: AuthorizationX-Ratelimit-Limit: 60X-Ratelimit-Remaining: 55{"response":{"result":true,"reason":""}}
jlestel reacted with thumbs up emoji

@naltatisnaltatis added the needs documentationTriggers issue creation in evcc-io/docs labelFeb 19, 2025
@naltatisnaltatis marked this pull request as ready for reviewFebruary 19, 2025 19:27
@andig
Copy link
MemberAuthor

@naltatis done. Ich hatte den falschen Transport gegriffen. Könntest Du es nochmal kurz testen? Vielen Dank!

@naltatis
Copy link
Member

@andig Works.

Sache, die mir gerade aufgefallen ist. WirRedacten nur die initialen Tokens. Die aktualisierten (aus DB) müssten da eigentlich auch noch rein. Ist aber ein anderes und vmtl. übergreifendes Thema.

@andig
Copy link
MemberAuthor

Ja, bekannte Einschränkung 🤫

@andigandig merged commit8e521ca intomasterFeb 21, 2025
6 checks passed
@andigandig deleted the feat/mta-token branchFebruary 21, 2025 09:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@naltatisnaltatisnaltatis approved these changes

Assignees
No one assigned
Labels
needs documentationTriggers issue creation in evcc-io/docsvehiclesSpecific vehicle support
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

401 Unauthorized: Invalid API User error
3 participants
@andig@naltatis@jlestel

[8]ページ先頭

©2009-2025 Movatter.jp