tdorssers / TeslaPy

A Python module to use the Tesla Motors Owner API
MIT License
374 stars 84 forks source link

Seems like the teslapy is no longer working with the new Tesla APIs #156

Open aviadoffer opened 9 months ago

aviadoffer commented 9 months ago

I'm now getting an error : Endpoint is only available on fleetapi I understand that this is due to the new API requirements, just wondering if there is a plan to update Teslapy project? Thanks in advance!

israndy commented 9 months ago

Perhaps the intent was to rely on Tesla to support these apps, sadly I made my code rather reliant on the easy calls in TeslaPy

doubledrat commented 9 months ago

Same here on vehicle_list()

requests.exceptions.HTTPError: 412 Client Error: Endpoint is only available on fleetapi. Visit https://developer.tesla.com/docs for more info for url: https://owner-api.teslamotors.com/api/1/vehicles

DaveTBlake commented 9 months ago

Yes access to the https://owner-api.teslamotors.com/api/1/vehicles endpoint stopped sometime over night (in UK), I would guess that for vehicle data you now have to use the Fleet API.

However api/1/products still works, so if you are using TeslaPy for powerwalls then removing refernce to tesla.vehicle_list() from your client scripts will keep working for now.

doubledrat commented 9 months ago

Yes access to the https://owner-api.teslamotors.com/api/1/vehicles endpoint stopped sometime over night (in UK), I would guess that for vehicle data you now have to use the Fleet API.

However api/1/products still works, so if you are using TeslaPy for powerwalls then removing refernce to tesla.vehicle_list() from your client scripts will keep working for now.

yes, but for how long? :(

I looked at registering for the fleet api, but you have to be a business :(

Chillywasher commented 9 months ago

In the same boat as you guys. I just tried the Home Assistant Tesla HACS integration and that works fine for 2 cars so I'm guessing there other implementations available to get at our Tesla data. Also see issue 150

weljajoh commented 9 months ago

This patch makes it work again for me by switching from VEHICLE_LIST to PRODUCT_LIST and filtering out batteries and solar (there is no 'vehicle' resource_type in the vehicle product response)

--- __init__.py.orig    2024-01-23 10:27:36.591958142 +0100
+++ __init__.py 2024-01-23 11:25:29.264901231 +0100
@@ -372,7 +372,8 @@

     def vehicle_list(self):
         """ Returns a list of `Vehicle` objects """
-        return [Vehicle(v, self) for v in self.api('VEHICLE_LIST')['response']]
+        return [Vehicle(v, self) for v in self.api('PRODUCT_LIST')['response']
+                if v.get('resource_type') != 'battery' and v.get('resource_type') != 'solar']

     def battery_list(self):
         """ Returns a list of `Battery` objects """
aviadoffer commented 9 months ago

I was able to register my app on tesla dev site ( Application Onboarding Request Approved ) . so now I have the keys from tesla. but how do I plug those into this API ?

dan-cristian commented 9 months ago

Same issue here. Looking at the doc there seems to be a way to make it work, for free, for a while, with limited no. of requests. https://developer.tesla.com/docs/fleet-api

dan-cristian commented 9 months ago

I tried to create a business account using valid business details but got the error at the end: Unable to Onboard, Contact your account manager....

aviadoffer commented 9 months ago

@dan-cristian uncheck the first option (get personal data etc) and it will work.

aviadoffer commented 9 months ago

For the record I used https://github.com/fabianhu/tesla_api and manage to get everything I need. this method worked for me after help from the author

DeLN0 commented 9 months ago

This patch makes it work again for me by switching from VEHICLE_LIST to PRODUCT_LIST and filtering out batteries and solar (there is no 'vehicle' resource_type in the vehicle product response)

--- __init__.py.orig  2024-01-23 10:27:36.591958142 +0100
+++ __init__.py   2024-01-23 11:25:29.264901231 +0100
@@ -372,7 +372,8 @@

     def vehicle_list(self):
         """ Returns a list of `Vehicle` objects """
-        return [Vehicle(v, self) for v in self.api('VEHICLE_LIST')['response']]
+        return [Vehicle(v, self) for v in self.api('PRODUCT_LIST')['response']
+                if v.get('resource_type') != 'battery' and v.get('resource_type') != 'solar']

     def battery_list(self):
         """ Returns a list of `Battery` objects """

This works as long as there are no other products than battery and solar. I have a Wall Connector and this crashes.

A better way is to check if product has vin and vehicle_id. Use the following code and it works:

def vehicle_list(self):
    """ Returns a list of `Vehicle` objects """  
    return [Vehicle(v, self) for v in self.api('PRODUCT_LIST')['response'] 
            if 'vin' in v and 'vehicle_id' in v]
DaveTBlake commented 9 months ago

I just tried to create a business account using valid UK business details (by tax id it wants a VAT number and not a UTR) but got the error at the end: Unable to Onboard, Contact your account manager.

The only scope I checked was Powerwall Information, the first option get personal data was unchecked. Suggestions?

DeLN0 commented 9 months ago

I just tried to create a business account using valid UK business details (by tax id it wants a VAT number and not a UTR) but got the error at the end: Unable to Onboard, Contact your account manager.

The only scope I checked was Powerwall Information, the first option get personal data was unchecked. Suggestions?

DaveTBlake you can use the old API, you just need to replace def vehicle_list(self) function in the __init__.py file from teslapy library with this function:

def vehicle_list(self):
    """ Returns a list of `Vehicle` objects """  
    return [Vehicle(v, self) for v in self.api('PRODUCT_LIST')['response'] 
            if 'vin' in v and 'vehicle_id' in v]
DeLN0 commented 9 months ago

I just tried to create a business account using valid UK business details (by tax id it wants a VAT number and not a UTR) but got the error at the end: Unable to Onboard, Contact your account manager.

The only scope I checked was Powerwall Information, the first option get personal data was unchecked. Suggestions?

As a suggestion try to enter browser console and check what messages you have there.

DeLN0 commented 9 months ago

@dan-cristian uncheck the first option (get personal data etc) and it will work.

I also have this problem. In my case, i can't uncheck the first option because i can't go back to the first step.

Any suggestions?

Screenshot 2024-01-24 at 19 57 31
DaveTBlake commented 9 months ago

@DeLN0 I know that for now the Owner API works for Powerwall settings, and I have modified TeslaPy to keep my script working. But the end of Owner API is coming so I'm looking to see if I can jump throught the hoops to move the FleetAPI

As a suggestion try to enter browser console and check what messages you have there.

Neat idea. Console shows Content Security Policy: The page's settings blocked the loading of a resource at eval ("script-src").

Not sure what to make of that. My guess is that my URLs are the problem, I own a domain but use free-parking and that doesn't have a certificate. I couldn't see how to get Localhost working either, which could be all I need. My next step is to look for some free storage I have point my domain at. All in a lot of effort just to get a script for one user working.

DeLN0 commented 9 months ago

@DaveTBlake

Not sure what to make of that. My guess is that my URLs are the problem, I own a domain but use free-parking and that doesn't have a certificate. I couldn't see how to get Localhost working either, which could be all I need. My next step is to look for some free storage I have point my domain at. All in a lot of effort just to get a script for one user working.

In my case, if i go to https://developer.tesla.com on my iPhone this is what i get, even though my domain is fine and certicates are up to date:

IMG_8792

mshoe007 commented 9 months ago

I managed to get developer access working yesterday following this tutorial.

Edited to show author's blog instead of the medium.com version which is paywalled:

https://shankarkumarasamy.blog/2023/10/29/tesla-developer-api-guide-account-setup-app-creation-registration-and-third-party-authentication-configuration-part-1/

israndy commented 9 months ago

Paywalled

DaveTBlake commented 9 months ago

@israndy that tutorial by Shanka Kumarasamy is also just in his blog too (not behind the Medium paywall) https://shankarkumarasamy.blog/2023/10/29/tesla-developer-api-guide-account-setup-app-creation-registration-and-third-party-authentication-configuration-part-1/

the-mace commented 9 months ago

I just tried to create a business account using valid UK business details (by tax id it wants a VAT number and not a UTR) but got the error at the end: Unable to Onboard, Contact your account manager. The only scope I checked was Powerwall Information, the first option get personal data was unchecked. Suggestions?

DaveTBlake you can use the old API, you just need to replace def vehicle_list(self) function in the __init__.py file from teslapy library with this function:

def vehicle_list(self):
    """ Returns a list of `Vehicle` objects """  
    return [Vehicle(v, self) for v in self.api('PRODUCT_LIST')['response'] 
            if 'vin' in v and 'vehicle_id' in v]

This would be good to to have in teslapy as a PR. This change worked for me, thanks!

mshoe007 commented 9 months ago

That patch allows TeslaPy to continue to do 'read' sorts of functions. But, if I try to issue a command, I get

 Client Error: Tesla Vehicle Command Protocol required, please refer to the documentation here: https://developer.tesla.com/docs/fleet-api

I think the old commands API now only works for pre refresh (2021) S & X?

The rest of us have to use the Fleet API for sending commands to the car.

aviadoffer commented 9 months ago

@mshoe007 I have a 2020 X and a 2022 X, both works fine with new API's to read data and to run commands. so moving to the fleet API works for me on both cars

JanJaapKo commented 9 months ago

@aviadoffer I gave the https://github.com/fabianhu/tesla_api a try but got stuck at the step of building the go language part. Are there any extensions to be made to the readme to make it clearer? I'm running on a Raspberry Pi 3 btw

aviadoffer commented 9 months ago

@JanJaapKo so I only did the simple step of importing the tesla_api_2024.py for the purpose of auth. placing the keys in TeslaKeys

so in a high level it looks like this:

from tesla_api import tesla_api_2024, TeslaAPI teslaApi = TeslaAPI() vehicles = teslaApi.get_vehicles_list()

Then I added the function I needed to the tesla_api_2024, example:

  def tesla_start_charge(self, vin):

          conn = http.client.HTTPSConnection("fleet-api.prd.na.vn.cloud.tesla.com")
          payload = json.dumps({})
          headers = {
              'Content-Type': 'application/json',
              'Authorization': f'Bearer {self.access_token}'
          }
          conn.request("POST", f"/api/1/vehicles/{vin}/command/charge_start", payload, headers)
          res = conn.getresponse()
          data = res.read()

and

  def tesla_set_charge_amp(self, vin , amps):

        conn = http.client.HTTPSConnection("fleet-api.prd.na.vn.cloud.tesla.com")
        payload = json.dumps({
            "charging_amps": f"{amps}"
        })
        headers = {
            'Content-Type': 'application/json',
            'Authorization': f'Bearer {self.access_token}'
        }
        conn.request("POST", f"/api/1/vehicles/{vin}/command/set_charging_amps", payload, headers)
        res = conn.getresponse()
        data = res.read()

etc...

DeLN0 commented 9 months ago

That patch allows TeslaPy to continue to do 'read' sorts of functions. But, if I try to issue a command, I get

 Client Error: Tesla Vehicle Command Protocol required, please refer to the documentation here: https://developer.tesla.com/docs/fleet-api

I think the old commands API now only works for pre refresh (2021) S & X?

The rest of us have to use the Fleet API for sending commands to the car.

Is your car newer than november 2023?

Tesla says November 2023 Newly delivered vehicles* will only support the Tesla Vehicle Command protocol after this date More info here: https://developer.tesla.com/docs/fleet-api#2023-11-17-vehicle-commands-endpoint-deprecation-timeline-action-required

mshoe007 commented 9 months ago

got stuck at the step of building the go language part. Are there any extensions to be made to the readme to make it clearer? I'm running on a Raspberry Pi 3 btw

The build instructions are here: https://github.com/teslamotors/vehicle-command

You need a 32-bit install of go for a Raspberry Pi 3. (I assume you're running a 32-bit OS on it). If you are running 64-bit linux, get the go1.21.6.linux-arm64.tar.gz file.

 cd /tmp ; wget https://go.dev/dl/go1.21.6.linux-armv6l.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.6.linux-armv6l.tar.gz
PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
cd
git clone https://github.com/teslamotors/vehicle-command
cd vehicle-command/
go get ./...
go build ./...
go install ./...
ls $HOME/go/bin
ble*               tesla-control*     tesla-keygen*
tesla-auth-token*  tesla-http-proxy*  unlock*
tesla-control --help
Usage: tesla-control [OPTION...] COMMAND [ARG...]

Run tesla-control help COMMAND for more information. Valid COMMANDs are listed below.

 * Commands sent to a vehicle over the internet require a VIN and a token.
 * Commands sent to a vehicle over BLE require a VIN.
 * Account-management commands require a token.

Available OPTIONs:
  -ble
        Force BLE connection even if OAuth environment variables are defined
<etc>

Note you need to permanently set your PATH to include $HOME/bin/go if you have not already

fabianhu commented 9 months ago

@aviadoffer I gave the https://github.com/fabianhu/tesla_api a try but got stuck at the step of building the go language part. Are there any extensions to be made to the readme to make it clearer? I'm running on a Raspberry Pi 3 btw

@JanJaapKo please open an issue in my repo, I'll help!

@mshoe007 You can also compile on (Linux) PC , without installing Go on the Pi.

cd vehicle-command/cmd/tesla-control/
env GOOS=linux GOARCH=arm GOARM=7 
go build .

This generates an elf file, which can be directly executed on the Pi3. I just checked the .bash_history on my Pi, I did not install Go. Updated the readme too...

leepfrog-ger commented 9 months ago

@DaveTBlake @DeLN0

Is your domain pointing to a CNAME record by any chance? I ran into the same issue, after pointing it directly to an A record it worked

DeLN0 commented 9 months ago

@DaveTBlake @DeLN0

Is your domain pointing to a CNAME record by any chance? I ran into the same issue, after pointing it directly to an A record it worked

@leepfrog-ger This was exactly my case! This issue drove me SO mad that i ended up registering a new domain, to which by chance i didn't attach any CNAME record. This new domain was ok with Tesla so the app was approved instantly.

Ty for pointing this out!

DeLN0 commented 9 months ago

@tdorssers Ty for the commits!

Do you think the Owner API hence TeslaPy will still work in the future (regardless of what Tesla says) ? Because for now the Android app still uses Owner API i think.

Are you planning to update TeslaPy to support the new Tesla Vehicle Command protocol? It seems Tesla makes it possible to set up a proxy server to maintain compatibility with Owner API:

https://github.com/teslamotors/vehicle-command

Some developers may be familiar with Tesla's Owner API. Owner API will stop working as vehicles begin requiring end-to-end command authentication. If you are one of these developers, you can set up the proxy server or refactor your application to use this library directly.

Ty for your contributions btw!

JanJaapKo commented 9 months ago

@tdorssers I manually changed the code to fetch the product list iso vehicle list, so it works again. However, when running a new install or upgrade with pip, the version stays at 2.8.0. Any ideas?

Further, this issue seems to mix the broken owner api (which should be fixed with recent commits) and the move to the fleet API to be able to send commands, correct?

mshoe007 commented 9 months ago

@DeLN0 - "Do you think the Owner API hence TeslaPy will still work in the future (regardless of what Tesla says) ?"

TL;DR: Yes with restrictions (no sending commands to 3/Y and 2021+ S/X)

Tesla has explicitly said the Owner API will continue to be available for pre 2021 S & X as those vehicles do not support the FleetAPI. https://developer.tesla.com/docs/fleet-api#2023-11-17-vehicle-commands-endpoint-deprecation-timeline-action-required

January 2024: All vehicles will require Tesla Vehicle Command protocol. The REST API will be fully deprecated where where is

*Fleet accounts are excluded from these changes until further notice. Pre-2021 Model S/X are excluded from these changes.

Plus, for non-commands, the "REST API" (as Tesla calls it, the "Owner API" as we call it) is not going away for any vehicles. See the 2023-10-09 Announcement on the fleet-api page (above)

Following the release of Tesla Vehicle Command SDK support for REST API vehicle command endpoints is now reaching end of life. Starting 2024 most vehicles will require sending commands via Tesla Vehicle Command SDK.

The RestAPI/OwnerAPI no longer supports the 'command' parts of the API for 3/y and 2021+ S/X. (with whatever exception "Fleet accounts" means)

@DeLN0 : "Are you planning to update TeslaPy to support the new Tesla Vehicle Command protocol? It seems Tesla makes it possible to set up a proxy server to maintain compatibility with Owner API"

It seems like you're hoping someone (possibly the owner of TeslaPy?) would set up a public proxy for the the Owner API and folks could have TeslaPy use it rather than Tesla's servers. That would work, except:

Any proxy uses the tesla-control program to send commands to the vehicle (the proxy will use the old API for some other things).

Another minor wrinkle is that cars will only accept commands from developer apps that the owner of the vehicle has previously approved. That's not a big deal, as the owner of the proxy merely needs to supply a URL that user can click on which will send a request to Tesla to open the owner's Tesla App to approve access. It looks like https://tesla.com/_ak/DEVELOPER.COM where DEVELOPER.COM is replaced by the domain name the registered developer used to gain access to the FleetAPI.

mshoe007 commented 9 months ago

@JanJaapKo "I manually changed the code to fetch the product list iso vehicle list, so it works again. However, when running a new install or upgrade with pip, the version stays at 2.8.0. Any ideas?"

I don't understand. pip install and 'new install' grab tdorssers last published release. Of course the version number does not change.

If you have installed TeslaPy locally, you need to modify your local copy of the python TeslaPy package. Doing pip upgrade or a fresh install could destroy your local changes.

After you make your local change to use the product list, if you want a different version number (which is a good plan), you should find the TeslaPy/__init__.py file on your computer and modify the __version__ = line

mshoe007 commented 9 months ago

I wrote

It seems like you're hoping someone (possibly the owner of TeslaPy?) would set up a public proxy for the the Owner API and folks could have TeslaPy use it rather than Tesla's servers. That would work, except:

It looks like at least one developer is going to do this. See https://github.com/alandtse/tesla/issues/743#issuecomment-1879967335

I am planning to launch a low cost API only serverless competitor for Home Assistant users: https://teslemetry.com/ Just waiting for Tesla to sign my Fleet Telemetry CSR, but the Fleet API is fully functional.

If that happens, and TeslaPy supports alternative REST servers, then that may be one option to continue using TeslaPy

mshoe007 commented 9 months ago

FYI: This developer has forked the Tesla proxy code to create a proxy that does not require using the FleetAPI

https://github.com/lotharbach/tesla-command-proxy/tree/owner-proxy

@DeLN0 - it still requires someone to set up such a proxy with public access for use by TeslaPy. Or, you can run the proxy locally for yourself.

DeLN0 commented 9 months ago

FYI: This developer has forked the Tesla proxy code to create a proxy that does not require using the FleetAPI

https://github.com/lotharbach/tesla-command-proxy/tree/owner-proxy

@DeLN0 - it still requires someone to set up such a proxy with public access for use by TeslaPy. Or, you can run the proxy locally for yourself.

@mshoe007 Thats great, ty for that! Running a proxy server locally seems the best path for now.

Waiting for Tesla to release their paid plans, just hoping prices don't go the way of Twitter API because that would be a bad sign for the open source community.

tdorssers commented 9 months ago

@tdorssers I manually changed the code to fetch the product list iso vehicle list, so it works again. However, when running a new install or upgrade with pip, the version stays at 2.8.0. Any ideas?

Further, this issue seems to mix the broken owner api (which should be fixed with recent commits) and the move to the fleet API to be able to send commands, correct?

Published new version on Pypi including vehicle endpoint fix. It does not include the ability to send commands.

tdorssers commented 9 months ago

@tdorssers Ty for the commits!

Do you think the Owner API hence TeslaPy will still work in the future (regardless of what Tesla says) ? Because for now the Android app still uses Owner API i think.

Are you planning to update TeslaPy to support the new Tesla Vehicle Command protocol? It seems Tesla makes it possible to set up a proxy server to maintain compatibility with Owner API:

https://github.com/teslamotors/vehicle-command

Some developers may be familiar with Tesla's Owner API. Owner API will stop working as vehicles begin requiring end-to-end command authentication. If you are one of these developers, you can set up the proxy server or refactor your application to use this library directly.

Ty for your contributions btw!

Yes I believe that the Owner API will still work in the future. But we need a Python implementation of the Tesla Vehicle Command Protocol otherwise we will be stuck using a proxy written in the Go language.

HenryRc0 commented 9 months ago

Published new version on Pypi including vehicle endpoint fix. It does not include the ability to send commands.

Just updated and everything is working again. Question about "It does not include the ability to send commands."

The commands I use in my script still work: python3 cli.py -e $account -c START_CHARGE > /dev/null python3 cli.py -e $account -c CHARGING_AMPS -k charging_amps=$newamps > /dev/null python3 cli.py -e $account -c STOP_CHARGE > /dev/null

Car is Model S 12/2022

Henry

DeLN0 commented 9 months ago

Published new version on Pypi including vehicle endpoint fix. It does not include the ability to send commands.

Just updated and everything is working again. Question about "It does not include the ability to send commands."

The commands I use in my script still work: python3 cli.py -e $account -c START_CHARGE > /dev/null python3 cli.py -e $account -c CHARGING_AMPS -k charging_amps=$newamps > /dev/null python3 cli.py -e $account -c STOP_CHARGE > /dev/null

Car is Model S 12/2022

Henry

@HenryRc0

Commands are working for me also. these are the Tesla timelines for deprecation: ` November 2023 Newly delivered vehicles* will only support the Tesla Vehicle Command protocol after this date
Nov - Dec 2023 REST API support will be deprecated on existing customer vehicles that have not used the REST API in the preceding 30 days
January 2024 All vehicles* will require Tesla Vehicle Command protocol. The REST API will be fully deprecated

November 2023 Newly delivered vehicles will only support the Tesla Vehicle Command protocol after this date Nov - Dec 2023 REST API support will be deprecated on existing customer vehicles that have not used the REST API in the preceding 30 days January 2024 All vehicles will require Tesla Vehicle Command protocol. The REST API will be fully deprecated`

I assume we are in this category 'Nov - Dec 2023 | REST API support will be deprecated on existing customer vehicles that have not used the REST API in the preceding 30 days' I have used Owners API frequently so din't go over 30 days of no usage. I would assume your case is the same. Today is the last day of January, let's see if command still work tomorow.

The writing is on the wall and we have to migrate to the new Fleet Api to ensure we are not left behind.

the-mace commented 9 months ago

The writing is on the wall and we have to migrate to the new Fleet Api to ensure we are not left behind.

I haven't looked into the fleet API. I know those like Tezlab, Teslafi etc have moved over. But for individuals, is there a free version? I dont want to pay (a third party or Tesla) for basic API queries about my car (like if its plugged in at night so I dont forget).

DeLN0 commented 9 months ago

The writing is on the wall and we have to migrate to the new Fleet Api to ensure we are not left behind.

I haven't looked into the fleet API. I know those like Tezlab, Teslafi etc have moved over. But for individuals, is there a free version? I dont want to pay (a third party or Tesla) for basic API queries about my car (like if its plugged in at night so I dont forget).

It's free for now but with limits. See https://developer.tesla.com/docs/fleet-api#membership-tiers

dan-cristian commented 9 months ago

I updated with the latest changes and it works, both reading and sending commands still works, so good news so far!

doubledrat commented 9 months ago

have you managed to register? I've failed with "unable to onboard"

On Wed, 31 Jan 2024 at 16:57, DeLN0 @.***> wrote:

The writing is on the wall and we have to migrate to the new Fleet Api to ensure we are not left behind.

I haven't looked into the fleet API. I know those like Tezlab, Teslafi etc have moved over. But for individuals, is there a free version? I dont want to pay (a third party or Tesla) for basic API queries about my car (like if its plugged in at night so I dont forget).

It's free for now but with limits. See https://developer.tesla.com/docs/fleet-api#membership-tiers

— Reply to this email directly, view it on GitHub https://github.com/tdorssers/TeslaPy/issues/156#issuecomment-1919520439, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZMGBOBIFNBDCLDGUJLPVTYRJZZHAVCNFSM6AAAAABCGGSE7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZGUZDANBTHE . You are receiving this because you commented.Message ID: @.***>

DaveTBlake commented 9 months ago

have you managed to register? I've failed with "unable to onboard"

@doubledrat I have failed to register too, just many "unable to onboard" when trying to register with my UK business no matter what I did with my website certification and DNS record, or with the scopes (I only want battery stuff but added vehicle just in case).

Did get further by 'accidentally' entering as a US business, but then recieved an email rejection saying Invalid origin, redirect, or return URI/URL. Update client details and resubmit. but I don't know if that is upset by my UK account email and SSL combination or if something is still wrong with my website.

My other wonder is if the UK business version of the registration page is broken. Browser console shows error "Failed to load resource: the server responded with a status of 400 (Bad Request)".

I am open to suggestions, is there is a way to get answers from Tesla?

doubledrat commented 9 months ago

perhaps raise it here? https://github.com/teslamotors/vehicle-command/issues/148

On Fri, 2 Feb 2024 at 12:43, Dave Blake @.***> wrote:

have you managed to register? I've failed with "unable to onboard"

@doubledrat https://github.com/doubledrat I have failed to register too, just many "unable to onboard" when trying to register with my UK business no matter what I did with my website certification and DNS record, or with the scopes (I only want battery stuff but added vehicle just in case).

Did get further by 'accidentally' entering as a US business, but then recieved an email rejection saying Invalid origin, redirect, or return URI/URL. Update client details and resubmit. but I don't know if that is upset by my UK account email and SSL combination or if something is still wrong with my website.

My other wonder is if the UK business version of the registration page is broken. Browser console shows error "Failed to load resource: the server responded with a status of 400 (Bad Request)".

I am open to suggestions, is there is a way to get answers from Tesla?

— Reply to this email directly, view it on GitHub https://github.com/tdorssers/TeslaPy/issues/156#issuecomment-1923731061, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZMGBP2ULTIXSRHUA3KMWDYRTNPZAVCNFSM6AAAAABCGGSE7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRTG4ZTCMBWGE . You are receiving this because you were mentioned.Message ID: @.***>

DeLN0 commented 9 months ago

@doubledrat @DaveTBlake

Yes, I've managed to register but i had to buy a new domain specifically for that. No clue what the issue is with my old domain, everything was set up correctly.

Did get further by 'accidentally' entering as a US business, but then recieved an email rejection saying Invalid origin, redirect, or return URI/URL. Update client details and resubmit. but I don't know if that is upset by my UK account email and SSL combination or if something is still wrong with my website.

If you want a key just for personal testing, you can use any website and business you want from the internet. I have tried and even tesla.com works. Not recommending to do that and not sure if legal, but it works.

But if you actually need to receive a callbak url, for that you have to own the domain.

DaveTBlake commented 9 months ago

If you want a key just for personal testing, you can use any website and business you want from the internet.

@DeLN0 really!?!?!? Don't I need to do something with code validation at the web site? All I want is to fetch data and control my powerwall, I don't care about cars or other people etc. I thought I had to jump through the business and third-party app hoop to be able to use the Fleet API. I know that the Owner API still works, but for how long, and using a published and offical API seems a better idea, but it is just for my own personal 'hobby' use.