[teslascope] remove deprecated apiKey auth - #21394
Closed
psmedley wants to merge 5 commits into
Closed
Conversation
Signed-off-by: Paul Smedley <paul@smedley.id.au>
This reverts commit f23ff94.
…y Teslascope by Dec 2026 Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the deprecated Teslascope API key authentication path from the Teslascope binding, leaving Personal Access Token (PAT) authentication as the only supported method in preparation for Teslascope’s planned API key shutdown.
Changes:
- Removed
apiKeyconfiguration from Thing metadata and i18n labels/descriptions. - Simplified HTTP target methods and account handler logic to use PAT-only requests.
- Updated binding documentation to remove API key references.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| bundles/org.openhab.binding.teslascope/src/main/resources/OH-INF/thing/thing-types.xml | Removes API key config parameter from the account bridge metadata. |
| bundles/org.openhab.binding.teslascope/src/main/resources/OH-INF/i18n/teslascope.properties | Removes API key-related i18n strings for Thing configuration. |
| bundles/org.openhab.binding.teslascope/src/main/java/org/openhab/binding/teslascope/internal/TeslascopeWebTargets.java | Removes API key URL query auth path; uses PAT-only invocation. |
| bundles/org.openhab.binding.teslascope/src/main/java/org/openhab/binding/teslascope/internal/TeslascopeAccountHandler.java | Drops API key usage and deprecation warning; enforces PAT presence at init. |
| bundles/org.openhab.binding.teslascope/src/main/java/org/openhab/binding/teslascope/internal/TeslascopeAccountConfiguration.java | Removes deprecated apiKey field from configuration DTO. |
| bundles/org.openhab.binding.teslascope/README.md | Removes API key from configuration documentation. |
Suppressed comments (1)
bundles/org.openhab.binding.teslascope/src/main/resources/OH-INF/thing/thing-types.xml:15
- The Personal Access Token is now the only supported credential, but the config metadata still marks it as optional and does not set a password context. This can lead to confusing UI validation and may display the token in clear text; mark it required and set password so UIs treat it as a secret.
<parameter name="personalAccessToken" type="text" required="false">
<label>Personal Access Token</label>
<description>Personal Access Token provided by Teslascope</description>
</parameter>
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
198
to
200
| thing-type.config.teslascope.service.publicID.label = Vehicle Public ID | ||
| thing-type.config.teslascope.service.publicID.description = Vehicle public ID listed in Teslascope | ||
| thing-type.config.teslascope.service.refreshInterval.label = Refresh Interval |
| | Thing Parameter | Default Value | Required | Advanced | Description | | ||
| |---------------------|---------------|----------|----------|--------------------------------------------------------------------------------------| | ||
| | apiKey | N/A | No | No | API Key from the Teslascope website (deprecated) | | ||
| | personalAccessToken | N/A | No | No | Personal Access Token generated from the Teslascope website | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Teslascope service hsa deprecated the apikey method in favour of oauth and Personal Access Tokens (PATs).
Support for PATs was added on OH 5.2, and a warning was added to logs for users who are using ApiKeys to encourage then to nove to PATs.
The Teslascope maintainer intends to remove support for apiKeys at the end of 2026, which aligns nicely with the OH 5.3 release cycle, so this PR removes support for apikey and leaves only support for PATs.
This is a breaking change for anyone who has ignored the release notes for 5.2.