Support for Refresh Tokens
Sense has updated their API to auto-expire auth tokens every 30 days as well as implementing refresh tokens to request a new auth token. This update adds support for refresh tokens and automatically renewing the auth token on auth failures.
Breaking Changes
The new refresh token will need to be stored and loaded. Any script that implements the load_auth
function must be updated. Instead of
sense.load_auth(access_token, user_id, monitor_id)
it should be called with
sense.load_auth(access_token, user_id, device_id, refresh_token)
sense.set_monitor_id(monitor_id)
New Functions
Added two new functions:
renew_auth()
- manually renew the auth token
logout()
- logout
Last Release for Python 2
This will be the last major release supporting Python 2