Skip to content
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

The remote server returned an error: (400) Bad Request. (The remote server returned an error: (400) Bad Request.) #12

Open
phuongpham opened this issue Jan 31, 2021 · 2 comments

Comments

@phuongpham
Copy link

Hi
Seems like Tesla have change the authentication for Tesla API.
This is already been discussed here:

https://tesla-api.timdorr.com/api-basics/authentication#get-https-auth-tesla-com-oauth-2-v-3-authorize
Tesla has deprecated the /oauth/token endpoint in favor of using auth.tesla.com

@JonnMsft
Copy link
Owner

Thanks Phuong! I admit I haven't been maintaining this project, mostly because it didn't seem to generate much interest. I could try to update it but it would probably be a while before I get to that. If you or someone else want to propose changes via pull request, I could review and incorporate these into the project, and maybe republish to PowerShell Gallery.

@phuongpham
Copy link
Author

Thanks Phuong! I admit I haven't been maintaining this project, mostly because it didn't seem to generate much interest. I could try to update it but it would probably be a while before I get to that. If you or someone else want to propose changes via pull request, I could review and incorporate these into the project, and maybe republish to PowerShell Gallery.

Hi @JonnMsft.
I have tried to look into this. But it seems like it very complicated to rewrite the connect function.
It required multiple invoke-RestMethod to establish the connection and to get the token.
It also seems it has been changed the way to refresh the access token.
I have tried to look at have this has been implemented with ruby here: https://github.com/timdorr/tesla-api/blob/master/lib/tesla_api/client.rb
Maybe someone with better knowledge on powershell can help us to implement this in powershell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants