New York Times Cookie Authentication Setup¶
The New York Times uses CAPTCHA-protected login, making automated authentication difficult. Instead, we use cookie-based authentication where you extract your session cookie from your browser after logging in manually.
Quick Setup (5 minutes)¶
Step 1: Log in to NYT¶
- Open your browser and go to https://www.nytimes.com
- Click "Log In" and enter your credentials
- Make sure you're successfully logged in (you should see your name/account)
Step 2: Extract the Cookie¶
Chrome / Brave / Edge:¶
- Press
F12to open Developer Tools - Click the Application tab (or Storage in some browsers)
- In the left sidebar, expand Cookies → https://www.nytimes.com
- Find the cookie named
NYT-S - Double-click the Value column to select the entire cookie value
- Copy it (Ctrl+C / Cmd+C)
Firefox:¶
- Press
F12to open Developer Tools - Click the Storage tab
- Expand Cookies → https://www.nytimes.com
- Find the cookie named
NYT-S - Double-click the Value to select and copy
Safari:¶
- Enable Developer menu: Preferences → Advanced → Show Develop menu
- Develop → Show Web Inspector
- Click Storage tab
- Select Cookies → https://www.nytimes.com
- Find
NYT-Sand copy the value
Step 3: Add to Kiosque Config¶
Open your kiosque configuration file:
# Linux/Mac
nano ~/.config/kiosque/kiosque.conf
# Or use your favorite editor
code ~/.config/kiosque/kiosque.conf
Add or update the NYT section:
Important:
- Replace
YOUR_COOKIE_VALUE_HEREwith the actual cookie value you copied - The cookie value is usually a long string of characters
- Don't add quotes around the value
Step 4: Test¶
You should now see the full article instead of just a preview!
Troubleshooting¶
"Still seeing paywall messages"¶
- Make sure you copied the entire cookie value (it's long!)
- Check there are no extra spaces in the config file
- Verify you're logged in to NYT in your browser
- Try logging out and back in, then get a fresh cookie
"Cookie expired"¶
NYT cookies typically last several months, but they do expire. When this happens:
- Log in to nytimes.com again in your browser
- Extract a new cookie value
- Update your config file
"Getting 403 errors"¶
This means:
- Cookie is invalid or expired
- Cookie wasn't set correctly in config
- Try clearing kiosque cache and getting a fresh cookie
Security Notes¶
- Your NYT cookie is like a password - don't share it
- The cookie gives access to your NYT subscription
- Anyone with your cookie can access NYT as you
- Store your config file securely (it should be readable only by you)
Cookie Lifespan¶
- NYT cookies typically last 3-6 months
- The cookie may expire sooner if you log out
- You'll need to refresh it occasionally
Alternative: Username/Password (Not Recommended)¶
Username/password authentication is not currently supported due to:
- CAPTCHA protection on login page
- Risk of account lockout
- NYT's aggressive bot detection
Cookie-based auth is more reliable and secure.
How It Works¶
When you provide the cookie_nyt_s value:
- Kiosque adds the cookie to HTTP requests
- NYT sees the valid session cookie
- NYT serves you the full article (as a logged-in subscriber)
- Kiosque extracts and converts to markdown
This is the same as accessing NYT articles in your browser while logged in.