The login_with class method and the closely related get_token_and_login
are only to be used by interactive applications (not cron scripts).
The get_token_and_login docstring explains:
This is a convenience method which will open up the user's preferred
web browser and thus should not be used by most applications.
Applications should, instead, use Credentials.get_request_token() to
obtain the authorization URL and
Credentials.exchange_request_token_for_access_token() to obtain the
actual OAuth access token.
The login_with class method and the closely related get_token_and_login
are only to be used by interactive applications (not cron scripts).
The get_token_and_login docstring explains:
This is a convenience method which will open up the user's preferred get_request_ token() to .exchange_ request_ token_for_ access_ token() to obtain the
web browser and thus should not be used by most applications.
Applications should, instead, use Credentials.
obtain the authorization URL and
Credentials
actual OAuth access token.