srwalter / garmin-tesla

ConnectIQ widget for Tesla vehicle control
32 stars 17 forks source link

Add Tesla API token as an app setting #1

Closed hobbe closed 4 years ago

hobbe commented 4 years ago

The Tesla API token is an app setting that can be set in Garmin Connect or Connect IQ apps.

If token is null, normal flow, redirects to login page. If token is not null, authentication is done. If a 401 error occurs (unauthorized), token is reset to null.

hobbe commented 4 years ago

Thanks @srwalter.

The settings do not appear in Garmin Connect until the app is released (yeah, not cool for testing...) However, using the SDK with Eclipse, you can see the settings in the "App Settings Editor": image

For testing on my watch, I manually upload a development version with the token hard-coded.