Securely generate API tokens for third-party access to your Tesla.
Multi-factor authentication (MFA) and Captcha are supported.
Precompiled binaries are currently only available for x86-64.
❯ tesla_auth --help
Usage: tesla_auth [-d] [-k]
Tesla API tokens generator
Options:
-d, --debug print debug output
-c, --clear-browsing-data
clear browsing data at startup
--help display usage information
- Run the
tesla_auth
executable (either by double-clicking it or directly in a terminal) - Enter your Tesla account credentials (and MFA code if necessary)
- You'll get a final window where you can select and copy the access token and refresh token
WebKit is native on macOS so no additional dependencies are required.
WebView2 provided by Microsoft Edge Chromium is used. So Windows 7, 8, 10 and 11 are supported.
WebKitGTK is required for WebView and libxdo
is used to make the predfined Copy, Cut, Paste and SelectAll menu items work. So please make sure the following packages are installed:
sudo pacman -S webkit2gtk-4.1 xdotool
sudo apt install libwebkit2gtk-4.1-dev libxdo-dev
sudo dnf install gtk3-devel webkit2gtk4.1-devel xdotool
# Clone repository
git clone https://github.com/adriankumpf/tesla_auth
cd tesla_auth
# Build (debug version)
cargo build
# Install (release version)
cargo install --path . --locked
Apache-2.0/MIT