|
1 | 1 | # Meta AI API Cookie Configuration |
2 | 2 | # Copy this file to .env and fill in your Meta AI cookies |
3 | 3 |
|
4 | | -# Required cookies (Get these from your browser when logged into meta.ai) |
| 4 | +# ========================================= |
| 5 | +# Required Cookies (MUST be provided) |
| 6 | +# ========================================= |
| 7 | +# Get these from your browser when logged into https://meta.ai |
| 8 | + |
| 9 | +# Device/browser identifier cookie - REQUIRED |
| 10 | +# Extract from: DevTools > Application > Cookies > meta.ai |
5 | 11 | META_AI_DATR=your_datr_cookie_value |
| 12 | + |
| 13 | +# Meta AI session cookie - REQUIRED |
| 14 | +# Extract from: DevTools > Application > Cookies > meta.ai |
6 | 15 | META_AI_ABRA_SESS=your_abra_sess_cookie_value |
7 | | -META_AI_DPR=your_dpr_cookie_value |
8 | | -META_AI_WD=your_wd_cookie_value |
9 | 16 |
|
10 | | -# Optional cookies (recommended for better stability) |
11 | | -#META_AI_JS_DATR=your_js_datr_value |
12 | | -#META_AI_ABRA_CSRF=your_abra_csrf_value |
| 17 | +# ========================================= |
| 18 | +# Critical Session Cookie (HIGHLY RECOMMENDED) |
| 19 | +# ========================================= |
| 20 | + |
| 21 | +# Ecto session token - Maintains session state across requests |
| 22 | +# This is the most important cookie for API functionality |
| 23 | +# Format: <uuid>.v1%3A<base64-encoded-data> |
| 24 | +# Extract from: DevTools > Application > Cookies > meta.ai |
| 25 | +# NOTE: This changes frequently and may expire, so re-extract if API calls fail |
| 26 | +META_AI_ECTO_1_SESS=your_ecto_1_sess_value |
| 27 | + |
| 28 | +# ========================================= |
| 29 | +# Recommended Optional Cookies |
| 30 | +# ========================================= |
| 31 | + |
| 32 | +# Device pixel ratio (typical: 1 or 1.25) |
| 33 | +META_AI_DPR=1.25 |
| 34 | + |
| 35 | +# Window dimensions (e.g., "1366x732" or "1920x1080") |
| 36 | +META_AI_WD=759x732 |
| 37 | + |
| 38 | +# JavaScript-based datr variant |
| 39 | +META_AI_JS_DATR=your_js_datr_value |
| 40 | + |
| 41 | +# CSRF token for Meta AI |
| 42 | +META_AI_ABRA_CSRF=your_abra_csrf_value |
| 43 | + |
| 44 | +# Page state cookies (static values, usually: 1) |
| 45 | +META_AI_PS_L=1 |
| 46 | +META_AI_PS_N=1 |
| 47 | + |
| 48 | +# ========================================= |
| 49 | +# Additional Cookies (For enhanced compatibility) |
| 50 | +# ========================================= |
13 | 51 |
|
14 | | -# Additional cookies for image/video generation |
15 | 52 | META_AI_C_USER=your_c_user_value |
16 | 53 | META_AI_XS=your_xs_value |
17 | 54 | META_AI_FR=your_fr_value |
18 | 55 |
|
| 56 | +# Challenge verification cookie (auto-handled, optional) |
| 57 | +META_AI_RD_CHALLENGE=your_rd_challenge_value |
| 58 | + |
| 59 | +# ========================================= |
| 60 | +# API Configuration |
| 61 | +# ========================================= |
| 62 | + |
19 | 63 | # Refresh interval in seconds (default: 3600 = 1 hour) |
20 | 64 | META_AI_REFRESH_INTERVAL_SECONDS=3600 |
21 | 65 |
|
22 | | -# How to get cookies: |
| 66 | +# ========================================= |
| 67 | +# Proxy Configuration (Optional) |
| 68 | +# ========================================= |
| 69 | + |
| 70 | +# HTTP proxy URL (if needed) |
| 71 | +# Example: http://proxy.example.com:8080 |
| 72 | +#META_AI_PROXY_HTTP= |
| 73 | + |
| 74 | +# HTTPS proxy URL (if needed) |
| 75 | +# Example: http://proxy.example.com:8080 |
| 76 | +#META_AI_PROXY_HTTPS= |
| 77 | + |
| 78 | +# ========================================= |
| 79 | +# How to Extract Cookies |
| 80 | +# ========================================= |
23 | 81 | # 1. Open browser and go to https://meta.ai |
24 | | -# 2. Open Developer Tools (F12) |
25 | | -# 3. Go to Application/Storage > Cookies > https://meta.ai |
26 | | -# 4. Copy the values for: datr, abra_sess, dpr, wd, c_user, xs, fr |
27 | | -# 5. Paste them above (without quotes) |
| 82 | +# 2. Open Developer Tools (F12 or Ctrl+Shift+I) |
| 83 | +# 3. Go to "Application" or "Storage" tab |
| 84 | +# 4. Click on "Cookies" in the left sidebar |
| 85 | +# 5. Select "https://www.meta.ai" from the list |
| 86 | +# 6. Extract these cookies in order of importance: |
| 87 | +# |
| 88 | +# CRITICAL: |
| 89 | +# -------- |
| 90 | +# - ecto_1_sess (META_AI_ECTO_1_SESS) - Session state token - MOST IMPORTANT |
| 91 | +# - datr (META_AI_DATR) - Device tracking - REQUIRED |
| 92 | +# - abra_sess (META_AI_ABRA_SESS) - Session - REQUIRED |
| 93 | +# |
| 94 | +# RECOMMENDED: |
| 95 | +# ----------- |
| 96 | +# - _js_datr (META_AI_JS_DATR) - JavaScript datr |
| 97 | +# - abra_csrf (META_AI_ABRA_CSRF) - CSRF protection |
| 98 | +# - dpr (META_AI_DPR) - Device pixel ratio |
| 99 | +# - wd (META_AI_WD) - Window dimensions |
| 100 | +# |
| 101 | +# OPTIONAL: |
| 102 | +# -------- |
| 103 | +# - ps_l (META_AI_PS_L) - Page state (usually 1) |
| 104 | +# - ps_n (META_AI_PS_N) - Page state (usually 1) |
| 105 | +# - c_user (META_AI_C_USER) - User ID |
| 106 | +# - xs (META_AI_XS) - Session check |
| 107 | +# - fr (META_AI_FR) - Friend request |
| 108 | +# |
| 109 | +# NOTE: ecto_1_sess is the PRIMARY session identifier. |
| 110 | +# If API calls return empty responses, ecto_1_sess may be expired. |
| 111 | +# Try re-extracting it from the browser. |
| 112 | +# 7. Paste the values above (without quotes) |
| 113 | +# 8. Rename this file from .env.example to .env |
0 commit comments