def token(self):
        """
        :rtype: str
        """

        if self._session_context is not None:
            return self.session_context.token
        elif self._installation_context is not None:
            return self.installation_context.token
        else:
            return None
:rtype: str