← back to Dear Bubbe Nextjs
GET_X_TOKENS.md
39 lines
# How to Get X.com Tokens for Auto-Posting
## Quick Steps:
1. **Open X.com in Chrome/Firefox**
2. **Login to @DearBubbe account**
3. **Open Developer Tools** (F12 or Right-click → Inspect)
4. **Go to Application Tab** (Chrome) or **Storage Tab** (Firefox)
5. **Click on Cookies → x.com**
6. **Find these two cookies:**
- `auth_token` - Copy the long value (starts with random letters/numbers)
- `ct0` - Copy this value too
## Once you have them, run this command:
```bash
node /root/Projects/dear-bubbe-nextjs/lib/x-graphql-poster.js setup YOUR_AUTH_TOKEN YOUR_CT0_TOKEN
```
Replace YOUR_AUTH_TOKEN and YOUR_CT0_TOKEN with the actual values you copied.
## Example:
```bash
node /root/Projects/dear-bubbe-nextjs/lib/x-graphql-poster.js setup 1234567890abcdef abcdef123456
```
## Test it works:
```bash
node /root/Projects/dear-bubbe-nextjs/lib/x-graphql-poster.js test "Testing Bubbe auto-post!"
```
## Post from queue:
```bash
node /root/Projects/dear-bubbe-nextjs/lib/x-graphql-poster.js
```
---
These tokens will last for weeks/months unless you logout!