docs: def _refresh_token(self):
          """
          Retrieves the OAuth2 token generated by the user's API key and API secret.
          Sets the instance property 'token' to this new token.
          If the current token is still live, the server will simply return that.
          """
  
          # use basic auth with API key and secret
          client_auth = requests.auth.HTTPBasicAuth(self.api_key, self.api_secret)
  
          # make request
          post_data = {"grant_type": "client_credentials"}
          response = requests.post(self.auth, auth=client_auth, data=post_data, proxies=self.proxies)
          self.last_response = response
  
          # raise exception if status code indicates an error
          if 400 <= response.status_code < 600:
              message = "{} {} Error (Trace-Id: {}): {}".format(response.status_code,
                                                                "Client" if response.status_code < 500 else "Server",
                                                                self._get_trace_id(response),
                                                                "unable to get token")
              raise HTTPError(message, response=response)
  
          # set token property to the received token
          self.token = response.json()["access_token"]