Skip to content

[teslascope] remove deprecated apiKey auth - #21394

Closed
psmedley wants to merge 5 commits into
openhab:mainfrom
psmedley:teslascope-auth
Closed

[teslascope] remove deprecated apiKey auth#21394
psmedley wants to merge 5 commits into
openhab:mainfrom
psmedley:teslascope-auth

Conversation

@psmedley

Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Paul Smedley <paul@smedley.id.au>
…y Teslascope by Dec 2026

Signed-off-by: Paul Smedley <paul@smedley.id.au>
Signed-off-by: Paul Smedley <paul@smedley.id.au>
@psmedley psmedley added the bug An unexpected problem or unintended behavior of an add-on label Aug 15, 2026
@psmedley
psmedley requested a lite review from Copilot August 15, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 apiKey configuration 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 |
@psmedley psmedley closed this Aug 15, 2026
@psmedley
psmedley deleted the teslascope-auth branch August 15, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants