Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • The final cut of the 9th episode of the Tesla Motors Club Podcast, featuring Balazs Biro, of the prominent Hungarian EV channel Villanyautósok, is now available. You can watch it now on YouTube or listen to it on all major podcast networks.

Tesla API Call in cURL -- Help Please

I'm trying to use cURL to do the authentication and get an access token but have been unable to get the proper format together. I am trying:

curl -H "Content-Type: application/json" -d {"grant_type" : "password", "client_id" : "***", "client_secret" : "***", "email" : "***", "password" : "***" } https://owner-api.teslamotors.com/oauth/token

Any help would be much appreciated.

Thanks!
 
I'm trying to use cURL to do the authentication and get an access token but have been unable to get the proper format together. I am trying:

curl -H "Content-Type: application/json" -d {"grant_type" : "password", "client_id" : "***", "client_secret" : "***", "email" : "***", "password" : "***" } https://owner-api.teslamotors.com/oauth/token

Any help would be much appreciated.

Thanks!

Courtesy of the evMote "team" ;)

curl --include --data "grant_type=password&client_id=xxxxxxxxxxx&client_secret=xxxxxxxx&[email protected]&password=xxxxxxxxx" --request POST 'https://owner-api.teslamotors.com/oauth/token'
 

Products we're discussing on TMC...

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top