Comments (8)
Similar issues all around, see teslamate-org/teslamate#1412 and teslamate-org/teslamate@9fee2b5 for a fix. I was wondering if the Useragent is really required or if it shouldn‘t be enough to use the same UA as the official app?
from tesla.
@uhthomas according to https://golang.org/pkg/net/http/ it should be possible to set accept-encoding: gzip
without the need to add a custom transport (check docs on DisableCompression
). That would play more nicely with users providing their own client.
from tesla.
I can confirm that the changes are working. The transport is needed to inject the user agent into the login process and not only afterwards.
@uhthomas I'd be happy to integrate this with #43, or do you want to take a stab?
from tesla.
I think the Go HTTP client will send the Accept-Encoding: gzip
header by default, but I had to specify the other fields for it to work.
There are some more complications, it looks like the clients are heavily rate-limited. Whether it's by IP, token or what, I don't know.
The graph shows points in time for where the exporter was able to get through, and where it wasn't. The error becomes
| 2021-03-11 10:37:40 | 2021/03/11 10:37:40 list vehicles: do: Get "https://owner-api.teslamotors.com/api/1/vehicles": oauth2: cannot fetch token: 403 Forbidden
| 2021-03-11 10:37:40 | Response: <HTML><HEAD>
| 2021-03-11 10:37:40 | <TITLE>Access Denied</TITLE>
| 2021-03-11 10:37:40 | </HEAD><BODY>
| 2021-03-11 10:37:40 | <H1>Access Denied</H1>
| 2021-03-11 10:37:40 |
| 2021-03-11 10:37:40 | You don't have permission to access "http://auth.tesla.com/oauth2/v3/token" on this server.<P>
| 2021-03-11 10:37:40 | Reference #18.5d2b1102.1615459060.61779f9
| 2021-03-11 10:37:40 | </BODY>
| 2021-03-11 10:37:40 | </HTML>
from tesla.
Cannot fetch token sounds as if its actually logging in at that time. That should only happen very rarely?
from tesla.
It happens quite often - these OAuth2 tokens only live for a short while.
from tesla.
@uhthomas should I merge your changes with #43?
from tesla.
Closed in #43
from tesla.
Related Issues (20)
- Unable to get Vehicle State HOT 9
- Login methods other than captcha HOT 2
- cmd/login timeout error HOT 1
- Time to add a new point release? HOT 2
- Vehicle images api?
- Announce fork HOT 3
- Token refresh issue HOT 1
- Login gives HTTP 403 HOT 4
- Error messages swallowed
- Support /api/products HOT 7
- "data_request" endpoints appear to have been removed by Tesla
- Use oauth2 PKCE HOT 1
- DriveState content change HOT 1
- Switch to Tesla vehicle-commands HOT 1
- VC API changes to struct definition
- fetching products fails if non-energy products are present HOT 1
- Commands returning 403 forbidden HOT 6
- No Current Location info anymore
- Support swap-in api replacement based on vehicle-command proxy like Tessi HOT 5
- Deprecate this repo in favor of evcc-io/tesla-proxy-client? HOT 1
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 tesla.