{"id":22903148,"url":"https://github.com/l480/tesla-http-api","last_synced_at":"2025-06-16T03:09:14.057Z","repository":{"id":259485269,"uuid":"878108352","full_name":"L480/tesla-http-api","owner":"L480","description":"🚗 REST API which accepts static bearer tokens and sends end-to-end authenticated commands to your vehicle","archived":false,"fork":false,"pushed_at":"2025-03-22T05:28:10.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:48:36.450Z","etag":null,"topics":["tesla","tesla-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/L480.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"L480_"}},"created_at":"2024-10-24T19:46:16.000Z","updated_at":"2025-03-22T05:26:13.000Z","dependencies_parsed_at":"2024-10-25T23:07:35.098Z","dependency_job_id":"c32500fa-3574-4381-b129-2723d43f99b5","html_url":"https://github.com/L480/tesla-http-api","commit_stats":null,"previous_names":["l480/tesla-http-api"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L480%2Ftesla-http-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L480%2Ftesla-http-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L480%2Ftesla-http-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/L480%2Ftesla-http-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/L480","download_url":"https://codeload.github.com/L480/tesla-http-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246598193,"owners_count":20802976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tesla","tesla-api"],"created_at":"2024-12-14T02:34:24.827Z","updated_at":"2025-04-01T07:21:31.651Z","avatar_url":"https://github.com/L480.png","language":"Go","funding_links":["https://ko-fi.com/L480_"],"categories":[],"sub_categories":[],"readme":"# tesla-http-api\n\nREST API based on [tesla-http-proxy](https://github.com/teslamotors/vehicle-command/tree/main/cmd/tesla-http-proxy) and Tesla's [proxy](https://pkg.go.dev/github.com/teslamotors/vehicle-command/pkg/proxy) Go package. [tesla-http-api](https://github.com/L480/tesla-http-api/pkgs/container/tesla-http-api) sends end-to-end authenticated commands to your vehicle and takes care about the authorization flow and token refresh.\n\n![tesla-http-api request flow](/images/request-flow.png \"tesla-http-api request flow\")\n\n## Usage\n\n### Run tesla-http-api\n\n```bash\n# Step 1: Clone repo\ngit clone https://github.com/L480/tesla-http-api.git\n# Step 2: Modify environment variables in docker-compose.yml\n# Check out https://developer.tesla.com/docs/fleet-api/authentication/overview\nnano docker-compose.yml\n# Step 3: Create working directory\nmkdir -p /opt/tesla-http-api\n# Step 4: Copy your private key to working directory\ncp my-private-key.pem /opt/tesla-http-api/private-key.pem\n# Step 5: Change directory ownership as container image does not run as root\nchown -R 93761:93761 /opt/tesla-http-api\n# Step 6: Pull and start container\ndocker compose up -d\n```\n\n\u003e [!IMPORTANT]  \n\u003e [tesla-http-api](https://github.com/L480/tesla-http-api/pkgs/container/tesla-http-api) is designed to run behind a proxy (like nginx, Cloudflare etc.).\n\n### Use tesla-http-api\n\n```bash\ncurl -H \"Authorization: Bearer $API_TOKEN\" \\\n     -H \"Content-Type: application/json\" \\\n     --data \"{}\" \\\n     -X POST \\\n     -i https://tesla-http-api.example.com/api/1/vehicles/{VIN}/command/flash_lights\n```\n\nYou can find all API endpoints in [Tesla's Fleet API documentation](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands).\n\n### Health check\n\n```bash\ncurl -X GET \\\n     -i https://tesla-http-api.example.com/health\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl480%2Ftesla-http-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl480%2Ftesla-http-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl480%2Ftesla-http-api/lists"}