@classmethod
def withToken(cls, token, environment, compression_enabled=True,
    backoff_config=None):
    """ Initialization of the smartobjects client

        The client exposes the Events, Objects, Owners and Search services.
        Initialization will fetch an API token with the id and secret provided.

        :param client_id (string): client_id part of the OAuth 2.0 credentials (available in your dashboard)
        :param client_secret (string): client_secret part of the OAuth 2.0 credentials (available in your dashboard)
        :param environment: a URL to the targeted environment (Environments.Sandbox or Environments.Production can be used)
            (note: client_id and client_secret are unique per environment)
        :param compression_enabled: gzip compress the request body (default: True)
        :param backoff_config: retry with exponential backoff (default: None)

        :note: Do not expose publicly code containing your client_id and client_secret
        .. seealso:: examples/simple_workflow.py
        """
    return cls(client_id=None, client_secret=None, environment=environment,
        compression_enabled=compression_enabled, backoff_config=
        backoff_config, token_override=token)
