Securely generate API tokens for third-party access to your Tesla.
Find a file
2026-02-25 17:00:47 +01:00
.github Upgrade cargo-dist to 0.31 (#95) 2026-02-25 16:59:52 +01:00
src Write pretty_print directly to formatter 2026-02-25 14:58:08 +01:00
.gitignore Open webview and retrieve tokens 2021-09-14 20:25:00 +02:00
build.rs Update dependencies 2022-06-14 16:58:05 +02:00
Cargo.lock Release v0.12.0 2026-02-25 17:00:47 +01:00
Cargo.toml Release v0.12.0 2026-02-25 17:00:47 +01:00
CHANGELOG.md Release v0.12.0 2026-02-25 17:00:47 +01:00
dist-workspace.toml Upgrade cargo-dist to 0.31 (#95) 2026-02-25 16:59:52 +01:00
LICENSE Add LICENSE 2021-09-17 23:49:14 +02:00
README.md Upgrade cargo-dist to 0.31 (#95) 2026-02-25 16:59:52 +01:00
RELEASE.md Release v0.12.0 2026-02-25 17:00:47 +01:00

Tesla Auth

CI CD

Securely generate API tokens for third-party access to your Tesla.

Supports MFA and Captcha through Tesla's native login flow.

Download

Usage

 tesla_auth --help
Usage: tesla_auth [-d] [-c]

Tesla API tokens generator

Options:
  -d, --debug       print debug output
  -c, --clear-browsing-data
                    clear browsing data at startup
  --help, help      display usage information

Steps

  1. Run the tesla_auth executable (either by double-clicking it or directly in a terminal)
  2. Enter your Tesla account credentials (and MFA code if necessary)
  3. You'll get a final window where you can select and copy the access token and refresh token

Platform-specific dependencies

macOS

WebKit is native on macOS so no additional dependencies are required.

Windows

WebView2 provided by Microsoft Edge Chromium is used. So Windows 7, 8, 10 and 11 are supported.

Linux

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:

Arch Linux / Manjaro:

sudo pacman -S webkit2gtk-4.1 xdotool

Debian / Ubuntu:

sudo apt install libwebkit2gtk-4.1-dev libxdo-dev

Fedora

sudo dnf install gtk3-devel webkit2gtk4.1-devel xdotool

Development

# 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

License

MIT