Skip to content

Commit 2dee821

Browse files
committed
add missing UA on oauth token fetch
1 parent 8b36eea commit 2dee821

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

custom_components/rtetempo/api_worker.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ def _compute_wait_time(
233233
def _get_access_token(self):
234234
_LOGGER.debug("Requesting access token")
235235
try:
236-
self._oauth.fetch_token(token_url=API_TOKEN_ENDPOINT, auth=self._auth)
236+
headers = {
237+
"User-Agent": USER_AGENT,
238+
}
239+
self._oauth.fetch_token(token_url=API_TOKEN_ENDPOINT, auth=self._auth, headers=headers)
237240
except (
238241
requests.exceptions.RequestException,
239242
OAuth2Error,

0 commit comments

Comments
 (0)