{"id":15063433,"url":"https://github.com/tobiasehlert/teslamateapi","last_synced_at":"2026-02-06T14:34:32.665Z","repository":{"id":38311009,"uuid":"337329126","full_name":"tobiasehlert/teslamateapi","owner":"tobiasehlert","description":"TeslaMateApi is a RESTful API to get data collected by self-hosted data logger TeslaMate in JSON.","archived":false,"fork":false,"pushed_at":"2026-02-03T21:58:27.000Z","size":573,"stargazers_count":188,"open_issues_count":10,"forks_count":38,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-02-04T09:28:18.889Z","etag":null,"topics":["api","mqtt","restful-api","self-hosted","tesla","teslamate"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobiasehlert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-09T07:45:54.000Z","updated_at":"2026-02-04T03:33:45.000Z","dependencies_parsed_at":"2023-10-16T23:11:32.191Z","dependency_job_id":"684260ef-8139-4b97-9e58-6a056acf140c","html_url":"https://github.com/tobiasehlert/teslamateapi","commit_stats":{"total_commits":427,"total_committers":10,"mean_commits":42.7,"dds":"0.43091334894613587","last_synced_commit":"a390b7ac8ee86f14f02720862669ce35a08c9345"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/tobiasehlert/teslamateapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasehlert%2Fteslamateapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasehlert%2Fteslamateapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasehlert%2Fteslamateapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasehlert%2Fteslamateapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobiasehlert","download_url":"https://codeload.github.com/tobiasehlert/teslamateapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobiasehlert%2Fteslamateapi/sbom","scorecard":{"id":890808,"data":{"date":"2025-08-11","repo":{"name":"github.com/tobiasehlert/teslamateapi","commit":"4701bb73acd61f656e50907e4ee561e555c5ac07"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 3/10 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/build.yml:19","Warn: topLevel 'packages' permission set to 'write': .github/workflows/build.yml:21","Info: topLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:12","Warn: topLevel 'security-events' permission set to 'write': .github/workflows/codeql-analysis.yml:13","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:140: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/tobiasehlert/teslamateapi/codeql-analysis.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:23","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/build.yml:24"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (23) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T11:45:48.019Z","repository_id":38311009,"created_at":"2025-08-24T11:45:48.020Z","updated_at":"2025-08-24T11:45:48.020Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29164869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T12:44:37.655Z","status":"ssl_error","status_checked_at":"2026-02-06T12:44:13.991Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","mqtt","restful-api","self-hosted","tesla","teslamate"],"created_at":"2024-09-24T23:56:43.622Z","updated_at":"2026-02-06T14:34:32.651Z","avatar_url":"https://github.com/tobiasehlert.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TeslaMateApi\n\n[![GitHub CI](https://img.shields.io/github/actions/workflow/status/tobiasehlert/teslamateapi/build.yml?branch=main\u0026logo=github)](https://github.com/tobiasehlert/teslamateapi/actions/workflows/build.yml)\n[![GitHub go.mod version](https://img.shields.io/github/go-mod/go-version/tobiasehlert/teslamateapi?logo=go)](https://github.com/tobiasehlert/teslamateapi/blob/main/go.mod)\n[![GitHub release](https://img.shields.io/github/v/release/tobiasehlert/teslamateapi?sort=semver\u0026logo=github)](https://github.com/tobiasehlert/teslamateapi/releases)\n[![Docker image size (tag)](https://img.shields.io/docker/image-size/tobiasehlert/teslamateapi/latest?logo=docker)](https://hub.docker.com/r/tobiasehlert/teslamateapi)\n[![GitHub license](https://img.shields.io/github/license/tobiasehlert/teslamateapi)](https://github.com/tobiasehlert/teslamateapi/blob/main/LICENSE)\n[![Docker pulls](https://img.shields.io/docker/pulls/tobiasehlert/teslamateapi)](https://hub.docker.com/r/tobiasehlert/teslamateapi)\n\nTeslaMateApi is a RESTful API to get data collected by self-hosted data logger **[TeslaMate](https://github.com/teslamate-org/teslamate)** in JSON.\n\n- Written in **[Golang](https://golang.org/)**\n- Data is collected from TeslaMate **Postgres** database and local **MQTT** Broker\n- Endpoints return data in JSON format\n- Send commands to your Tesla through the TeslaMateApi\n\n### Table of Contents\n\n- [How to use](#how-to-use)\n  - [Docker-compose](#docker-compose)\n  - [Environment variables](#environment-variables)\n- [API documentation](#api-documentation)\n  - [Available endpoints](#available-endpoints)\n  - [Authentication](#authentication)\n  - [Commands](#commands)\n- [Security information](#security-information)\n- [Credits](#credits)\n\n## How to use\n\nYou can either use it in a Docker container or go download the code and deploy it yourself on any server.\n\n### Docker-compose\n\nIf you run the simple Docker deployment of TeslaMate, then adding this will do the trick. You'll have TeslaMateApi exposed at port 8080 locally then.\n\n```yaml\nservices:\n  teslamateapi:\n    image: tobiasehlert/teslamateapi:latest\n    restart: always\n    depends_on:\n      - database\n    environment:\n      - ENCRYPTION_KEY=MySuperSecretEncryptionKey\n      - DATABASE_USER=teslamate\n      - DATABASE_PASS=secret\n      - DATABASE_NAME=teslamate\n      - DATABASE_HOST=database\n      - MQTT_HOST=mosquitto\n      - TZ=Europe/Berlin\n    ports:\n      - 8080:8080\n```\n\nIf you are using TeslaMate Traefik setup in Docker with environment variables file (.env), then you can simply add this section to the `services:` section of the `docker-compose.yml` file:\n\n```yaml\nservices:\n  teslamateapi:\n    image: tobiasehlert/teslamateapi:latest\n    restart: always\n    depends_on:\n      - database\n    environment:\n      - ENCRYPTION_KEY=${TM_ENCRYPTION_KEY}\n      - DATABASE_USER=${TM_DB_USER}\n      - DATABASE_PASS=${TM_DB_PASS}\n      - DATABASE_NAME=${TM_DB_NAME}\n      - DATABASE_HOST=database\n      - MQTT_HOST=mosquitto\n      - TZ=${TM_TZ}\n    labels:\n      - \"traefik.enable=true\"\n      - \"traefik.port=8080\"\n      - \"traefik.http.middlewares.redirect.redirectscheme.scheme=https\"\n      - \"traefik.http.middlewares.teslamateapi-auth.basicauth.realm=teslamateapi\"\n      - \"traefik.http.middlewares.teslamateapi-auth.basicauth.usersfile=/auth/.htpasswd\"\n      - \"traefik.http.routers.teslamateapi-insecure.rule=Host(`${FQDN_TM}`)\"\n      - \"traefik.http.routers.teslamateapi-insecure.middlewares=redirect\"\n      - \"traefik.http.routers.teslamateapi.rule=Host(`${FQDN_TM}`) \u0026\u0026 (Path(`/api`) || PathPrefix(`/api/`))\"\n      - \"traefik.http.routers.teslamateapi.entrypoints=websecure\"\n      - \"traefik.http.routers.teslamateapi.middlewares=teslamateapi-auth\"\n      - \"traefik.http.routers.teslamateapi.tls.certresolver=tmhttpchallenge\"\n```\n\nIn this case, the TeslaMateApi would be accessible at teslamate.example.com/api/\n\n### Environment variables\n\nBasically the same environment variables for the database, mqqt and timezone need to be set for TeslaMateApi as you have for TeslaMate.\n\n**Required** environment variables (even if there are some default values available)\n\n| Variable           | Type   | Default         |\n| ------------------ | ------ | --------------- |\n| **DATABASE_USER**  | string | _teslamate_     |\n| **DATABASE_PASS**  | string | _secret_        |\n| **DATABASE_NAME**  | string | _teslamate_     |\n| **DATABASE_HOST**  | string | _database_      |\n| **ENCRYPTION_KEY** | string |                 |\n| **MQTT_HOST**      | string | _mosquitto_     |\n| **TZ**             | string | _Europe/Berlin_ |\n\n**Optional** environment variables\n\n| Variable                      | Type    | Default                       |\n| ----------------------------- | ------- | ----------------------------- |\n| **TESLAMATE_SSL**             | boolean | _false_                       |\n| **TESLAMATE_HOST**            | string  | _teslamate_                   |\n| **TESLAMATE_PORT**            | string  | _4000_                        |\n| **API_TOKEN**                 | string  |                               |\n| **API_TOKEN_DISABLE**         | string  | _false_                       |\n| **DATABASE_PORT**             | integer | _5432_                        |\n| **DATABASE_TIMEOUT**          | integer | _60000_                       |\n| **DATABASE_SSL**              | string  | _disable_                     |\n| **DATABASE_SSL_CA_CERT_FILE** | string  |                               |\n| **DEBUG_MODE**                | boolean | _false_                       |\n| **DISABLE_MQTT**              | boolean | _false_                       |\n| **MQTT_TLS**                  | boolean | _false_                       |\n| **MQTT_PORT**                 | integer | _1883 (if TLS is true: 8883)_ |\n| **MQTT_USERNAME**             | string  |                               |\n| **MQTT_PASSWORD**             | string  |                               |\n| **MQTT_NAMESPACE**            | string  |                               |\n| **MQTT_CLIENTID**             | string  | _4 char random string_        |\n| **TESLA_API_HOST**            | string  | _retrieved by access token_   |\n\n**Commands** environment variables\n\n| Variable                    | Type    | Default           |\n| --------------------------- | ------- | ----------------- |\n| **ENABLE_COMMANDS**         | boolean | _false_           |\n| **COMMANDS_ALL**            | boolean | _false_           |\n| **COMMANDS_ALLOWLIST**      | string  | _allow_list.json_ |\n| **COMMANDS_LOGGING**        | boolean | _false_           |\n| **COMMANDS_WAKE**           | boolean | _false_           |\n| **COMMANDS_ALERT**          | boolean | _false_           |\n| **COMMANDS_REMOTESTART**    | boolean | _false_           |\n| **COMMANDS_HOMELINK**       | boolean | _false_           |\n| **COMMANDS_SPEEDLIMIT**     | boolean | _false_           |\n| **COMMANDS_VALET**          | boolean | _false_           |\n| **COMMANDS_SENTRYMODE**     | boolean | _false_           |\n| **COMMANDS_DOORS**          | boolean | _false_           |\n| **COMMANDS_TRUNK**          | boolean | _false_           |\n| **COMMANDS_WINDOWS**        | boolean | _false_           |\n| **COMMANDS_SUNROOF**        | boolean | _false_           |\n| **COMMANDS_CHARGING**       | boolean | _false_           |\n| **COMMANDS_CLIMATE**        | boolean | _false_           |\n| **COMMANDS_MEDIA**          | boolean | _false_           |\n| **COMMANDS_SHARING**        | boolean | _false_           |\n| **COMMANDS_SOFTWAREUPDATE** | boolean | _false_           |\n| **COMMANDS_UNKNOWN**        | boolean | _false_           |\n\n## API documentation\n\nMore detailed documentation of every endpoint will come..\n\n### Available endpoints\n\n- GET `/api`\n- GET `/api/v1`\n- GET `/api/v1/cars`\n- GET `/api/v1/cars/:CarID`\n- GET `/api/v1/cars/:CarID/battery-health`\n- GET `/api/v1/cars/:CarID/charges`\n  - Supported parameters:\n    - `startDate` (optional, use canonical UTC format in RFC3339)\n    - `endDate` (optional, use canonical UTC format in RFC3339)\n- GET `/api/v1/cars/:CarID/charges/current`\n- GET `/api/v1/cars/:CarID/charges/:ChargeID`\n- GET `/api/v1/cars/:CarID/command`\n- POST `/api/v1/cars/:CarID/command/:Command`\n- GET `/api/v1/cars/:CarID/drives`\n  - Supported parameters:\n    - `startDate` (optional, use canonical UTC format in RFC3339)\n    - `endDate` (optional, use canonical UTC format in RFC3339)\n    - `minDistance` (optional, filter by minimum trip distance, units based on TeslaMate settings)\n    - `maxDistance` (optional, filter by maximum trip distance, units based on TeslaMate settings)\n- GET `/api/v1/cars/:CarID/drives/:DriveID`\n- PUT `/api/v1/cars/:CarID/logging/:Command`\n- GET `/api/v1/cars/:CarID/logging`\n- GET `/api/v1/cars/:CarID/status`\n- GET `/api/v1/cars/:CarID/updates`\n- POST `/api/v1/cars/:CarID/wake_up`\n- GET `/api/v1/globalsettings`\n- GET `/api/healthz`\n- GET `/api/ping`\n- GET `/api/readyz`\n\n\u003e [!TIP]\n\u003e Canonical UTC format in RFC3339, e.g. `2006-01-02T15:04:05Z` or `2006-01-02T15:04:05+07:00`\n\n### Authentication\n\nIf you want to use command or logging endpoints such as `/api/v1/cars/:CarID/command/:Command`, `/api/v1/cars/:CarID/wake_up`, or `/api/v1/cars/:CarID/logging/:Command` you need to add authentication to your request.\n\nYou need to specify a token yourself (called **API_TOKEN**) in the environment variables file, to set it. The token has the requirement to be a minimum of 32 characters long.\n\nThere are two options available for authentication to be done.\n\n1. Adding extra header `Authorization: Bearer \u003ctoken\u003e` to your request. (recommended option)\n\n2. Adding URI parameter `?token=\u003ctoken\u003e` to the endpoint you try to reach. (not a good option)\n\n\\* _Note: If you use the second option and your logs get compromised, your token will be leaked._\n\n### Commands\n\nCommands are not enabled by default.\n\nYou need to enable them in your environment variables (with `ENABLE_COMMANDS=true`) and you need to specify which commands you want to use as well.\n\nThere are 3 ways of using Commands:\n\n1. Specific groups of commands can be enabled for example `COMMANDS_ALERT=true` will enable the [alert](https://tesla-api.timdorr.com/vehicle/commands/alerts) commands group.\n\n2. If you need a granular set of commands enabled `COMMANDS_ALLOWLIST=/path/to/allow_list.json` can be used to specify a [JSON formatted list of commands](./example/allow_list.json) to enable.\n\n3. The most coarse option `COMMANDS_ALL=true` will enable all commands (specific groups and allow_list will be ignored).\n\n\\* _Note: if `COMMANDS_ALL` or any specific group of commands has been enabled `COMMANDS_ALLOWLIST` is ignored._\n\nA list of possible commands can be found under [environment variables](#environment-variables).\n\nRegarding what fields you need to provide in the commands, we will referr to the [timdorr/tesla-api](https://tesla-api.timdorr.com/vehicle/commands) documentation.\n\n## Security information\n\nThere is **no** possibility to get access to your Tesla account tokens by this API and we'll keep it this way!\n\nThe data that is accessible is data like the cars, charges, drives, current status, updates and global settings.\n\nAlso, apply some authentication on your webserver in front of the container, so your data is not unprotected and too exposed. In the example above, we use the same .htpasswd file as used by TeslaMate.\n\nIf you have applied a level of authentication in front of the container `API_TOKEN_DISABLE=true` will allow commands without requiring the header or uri token value. But even then it's always rekommended to use an apikey.\n\n## Credits\n\n- Authors: Tobias Lindberg – [List of contributors](https://github.com/tobiasehlert/teslamateapi/graphs/contributors)\n- Distributed under MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiasehlert%2Fteslamateapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobiasehlert%2Fteslamateapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobiasehlert%2Fteslamateapi/lists"}