Skip to content

Instantly share code, notes, and snippets.

@emily-pesce
Created October 4, 2018 02:10
Show Gist options
  • Save emily-pesce/290a013f3a3b56041aa849ab8d88ea3c to your computer and use it in GitHub Desktop.
Save emily-pesce/290a013f3a3b56041aa849ab8d88ea3c to your computer and use it in GitHub Desktop.
Get Tesla API token
Use Ruby. Load into irb.
(reqires tesla_api gem: https://github.com/timdorr/tesla-api)
1) require 'tesla_api'
2) tesla_api = TeslaApi::Client.new("YOUR_TESLA_ACCOUNT_EMAIL_ADDRESS", "81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384", "c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3")
3) tesla_api.login!("YOUR_TESLA_ACCOUNT_PASSWORD")
This will return a long string that is your token.
@mfalgorepublic
Copy link

ON stepe 3 when I enter password getting this one error .
Any idea why it's showing me
ArgumentError: bad argument (expected URI object or URI string)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment