We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).
By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
Learn more on our terms of service and privacy policy.
Authenticate the AskNews CLI
asknews auth loginLog in with OAuth device flow or an API key
Options:
| Option | Description |
|---|---|
--api-key [key] | store an API key instead of using OAuth |
--no-browser | do not open the verification URL |
--scope <scope...> | OAuth scopes Default: ["openid","offline_access","news","chat","stories","analytics","distribution","profile","reddit"]. |
Examples:
asknews auth login
asknews auth login --no-browserasknews auth statusShow the active authentication method and verify it against AskNews
Options:
| Option | Description |
|---|---|
--offline | inspect local state without an API request |
Examples:
asknews auth status --output jsonasknews auth logoutRemove locally stored AskNews credentials
All commands support --output human|table|json|jsonl|yaml, --json, API/auth URL
overrides, request timeout, and color control. Result data is written to stdout; diagnostics
are written to stderr.