TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

Tesla API Call in cURL -- Help Please

Discussion in 'Model S: User Interface' started by 1NJ85D, Oct 22, 2015.

  1. 1NJ85D

    1NJ85D Member

    Joined:
    Feb 26, 2015
    Messages:
    83
    Location:
    Scotch Plains, NJ
    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!
     
  2. cryptyk

    cryptyk Member

    Joined:
    Jul 8, 2015
    Messages:
    260
    Location:
    United States
    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'
     

Share This Page