{"article":{"id":11034816771090,"url":"https://phantombuster.zendesk.com/api/v2/help_center/en-us/articles/11034816771090.json","html_url":"https://support.phantombuster.com/hc/en-us/articles/11034816771090-How-to-Fix-Expired-or-Invalid-Session-Cookie-Errors","author_id":24548449677458,"comments_disabled":false,"draft":false,"promoted":false,"position":1,"vote_sum":-2,"vote_count":2,"upvote_count":0,"downvote_count":2,"section_id":33292439773714,"created_at":"2023-04-17T08:58:51Z","updated_at":"2026-10-19T17:05:49Z","name":"How to Fix \"Expired\" or \"Invalid\" Session Cookie Errors","title":"How to Fix \"Expired\" or \"Invalid\" Session Cookie Errors","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2026-07-08T08:06:26Z","user_segment_id":null,"permission_group_id":538139,"content_tag_ids":[],"label_names":["session cookie","troubleshoot","cookie expired","reconnect account","slack connection","exit code 87","facebook session cookie","facebook proxy","facebook language"],"body":"<p class=\"phantom\">A session cookie error means PhantomBuster can't access your connected LinkedIn, Slack, Instagram, Facebook or other platform account, usually because you logged out, your session expired, you switched IP or device, or (for Slack) the workspace URL doesn't match your cookie. To fix it: open the Phantom showing the error, click Resolve in the console, and Re-connect the affected account from the Setup page. If the account belongs to someone else, they'll need to reconnect it themselves or share access via a magic link.</p><p>A session cookie is what <strong>PhantomBuster</strong> uses to stay connected to your LinkedIn, Instagram, Slack, Facebook or other platform account. When it expires, becomes invalid, or is tied to the wrong account, your <strong>automation</strong> can't run until the connection is refreshed.</p><h2 id=\"h_session_cookie_why\">Why you're seeing this</h2><p>Your <strong>automation</strong> may show one of these messages during execution:</p><ul>\n<li class=\"wysiwyg-list-bold\" data-list-item-id=\"e1c56f0d6bbf1f0b524d4a19700cdf710\"><strong>\"Expired session cookie\"</strong></li>\n<li class=\"wysiwyg-list-bold\" data-list-item-id=\"ef08e30352c67b2001a1558aa818f0a9d\"><strong>\"Invalid session cookie\"</strong></li>\n<li class=\"wysiwyg-list-bold\" data-list-item-id=\"ec7150e104242791f0da65dc28b5c16a5\"><strong>\"exit code: 87\"</strong></li>\n<li class=\"wysiwyg-list-bold\" data-list-item-id=\"e8905a6d79c2fbf93fadd4afe272d73f4\"><strong>\"Could not connect to Slack with this session cookie / workspace URL\"</strong></li>\n<li class=\"wysiwyg-list-bold\" data-list-item-id=\"ee24ada486e0669aa5da3197b44631609\"><strong>\"Could not connect to this Slack workspace, already signed in.\"</strong></li>\n</ul><p class=\"note-lightbulb\">All of these mean <strong>PhantomBuster</strong> can't access your connected account. The cause varies, use the sections below to find your situation and fix it.</p><figure class=\"wysiwyg-image\"><img style=\"aspect-ratio: 1559/947;\" src=\"https://support.phantombuster.com/hc/article_attachments/37049966082450\" alt=\"PhantomBuster Phantom console showing an expired session cookie error message\" width=\"1559\" height=\"947\"></figure><h2 id=\"h_session_cookie_fix1\">Fix 1: Your session cookie expired or became invalid</h2><p>This is the most common case. It happens when:</p><ul>\n<li data-list-item-id=\"e658b7c7e139b2d9a3d1544185bb3c35e\">You logged out of the platform manually or were logged out automatically.</li>\n<li data-list-item-id=\"e26e0a5a077dad8dbaf656b52143bdcb6\">Your session expired after a period of inactivity.</li>\n<li data-list-item-id=\"e0e57d56fbb9a766b958234f101d42cfd\">You switched IP address, used a VPN, or changed device.</li>\n<li data-list-item-id=\"e39aaf3bce887aa6c9a0972c4650949d3\">The platform reset your session for security reasons.</li>\n</ul><h3 id=\"h_session_cookie_fix1_own\">If it's your own account</h3><ol>\n<li data-list-item-id=\"e3654e52987807b059c5e2c2e60065208\">Go to the <a href=\"https://phantombuster.com/\" target=\"_blank\" rel=\"noopener noreferrer\">PhantomBuster Dashboard</a> and locate the <strong>automation</strong> showing the error.<br>➔ It will display a <strong>warning icon</strong> where your platform identity usually appears, along with an <strong>error tag</strong>.<br><img src=\"https://support.phantombuster.com/hc/article_attachments/37049963492114\" alt=\"PhantomBuster dashboard showing a warning icon and error tag on a Phantom with an expired session cookie\" width=\"1877\" height=\"1056\">\n</li>\n<li data-list-item-id=\"edf6527882e2713f13a00c37605da8102\">Click on the error to open the <strong>Phantom console</strong>.</li>\n<li data-list-item-id=\"e91562c43067a0b947636214573f8b45e\">Inside the console, click <strong>Resolve</strong>.<br>➔ This button appears when the session cookie is expired or invalid and points you directly to the account that needs to be refreshed.<br><img src=\"https://support.phantombuster.com/hc/article_attachments/37049966085906\" alt=\"PhantomBuster Phantom console showing the Resolve button for an invalid session cookie error\" width=\"1541\" height=\"936\">\n</li>\n<li data-list-item-id=\"ee8f773a7dd4c801e14ef0eaa1eeb42fd\">You'll be redirected to its <strong>Setup</strong> page.<br>➔ The affected account will be highlighted, and you can click <strong>Re-connect</strong> next to your LinkedIn account.<br><img src=\"https://support.phantombuster.com/hc/article_attachments/37049963494802\" alt=\"PhantomBuster Setup page showing the Re-connect button to refresh an expired LinkedIn session\" width=\"1910\" height=\"811\">\n</li>\n<li data-list-item-id=\"e529926ab47a3456a371b7321906fd142\">Save your updated setup.</li>\n</ol><p>Your <strong>automation</strong> can now run again.</p><p>If you need step-by-step guidance on reconnecting your account, see:</p><ul>\n<li data-list-item-id=\"e8f2f6250aecbaf81d2da383d4e92d6d9\">\n<a href=\"https://support.phantombuster.com/hc/en-us/articles/27815149833618-How-to-Install-and-Use-the-PhantomBuster-Browser-Extension\" target=\"_blank\" rel=\"noopener noreferrer\">How to Install and Use the PhantomBuster Browser Extension</a> (recommended method)</li>\n<li data-list-item-id=\"e1234fc5c0d6a672dd4dba3afa22a6a40\"><a href=\"https://support.phantombuster.com/hc/en-us/articles/24572365472786-How-to-Connect-Your-LinkedIn-Account-to-PhantomBuster#h_01JKTN1355QXYJ7R4MY69YF737\" target=\"_blank\" rel=\"noopener noreferrer\">How to Connect Your LinkedIn Account to PhantomBuster</a></li>\n<li data-list-item-id=\"e9766a1493414155230354ce2622847f9\"><a href=\"https://support.phantombuster.com/hc/en-us/articles/360007071779-How-to-Connect-Instagram-Facebook-X-and-Other-Accounts-to-PhantomBuster#h_01JWB57RHX3J0088P6RE0TME6B\" target=\"_blank\" rel=\"noopener noreferrer\">How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster</a></li>\n</ul><h3 id=\"h_session_cookie_fix1_other\">If the account belongs to someone else</h3><p>The session has to be refreshed from the <strong>account owner's side</strong>. You have two options:</p><ul>\n<li data-list-item-id=\"e819d5abf3b7b4354c2fb818c7d32cadd\">\n<strong>They can reconnect it themselves</strong> using the <strong>PhantomBuster browser extension</strong> or by pasting a fresh cookie.</li>\n<li data-list-item-id=\"e4011c4ff693461ca267adcba03f134c8\">\n<strong>You log into their account</strong> (for example, in a private window with the extension enabled) and reconnect it.</li>\n<li data-list-item-id=\"ec0e030d59ee754d34adb8ca42d616536\">\n<strong>For LinkedIn accounts shared via magic link</strong>, generate a new magic link so they can refresh their session securely without sharing credentials.</li>\n</ul><p>➔ See <a href=\"https://support.phantombuster.com/hc/en-us/articles/24572365472786-How-to-Connect-Your-LinkedIn-Account-to-PhantomBuster#h_01JWB44EMW9BX32G5R3JMCEDB2\" target=\"_blank\" rel=\"noopener noreferrer\">workspace members</a> and <a href=\"https://support.phantombuster.com/hc/en-us/articles/24572365472786-How-to-Connect-Your-LinkedIn-Account-to-PhantomBuster#h_01JWB3Z682TV7RYWF60B7539HQ\" target=\"_blank\" rel=\"noopener noreferrer\">magic links</a> in <em>How to Connect Your LinkedIn Account to PhantomBuster</em>, or <a href=\"https://support.phantombuster.com/hc/en-us/articles/360007071779-How-to-Connect-Instagram-Facebook-X-and-Other-Accounts-to-PhantomBuster#h_01JWBBPJPK7JHXYW8V99K225TM\" target=\"_blank\" rel=\"noopener noreferrer\">How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster</a> for other platforms.</p><p>Once the session is refreshed, the <strong>automation</strong> will work again.</p><h2 id=\"h_session_cookie_fix2\">Fix 2: You're using a Slack Phantom</h2><p><strong>Slack Phantoms require both a valid session cookie and a correct workspace URL</strong>. <br>If either doesn't match the workspace you're trying to automate, the <strong>Phantom</strong> won't be able to connect. <br>A common cause is having <strong>multiple Slack workspaces</strong> and using the cookie or URL from the wrong one.</p><h3 id=\"h_session_cookie_fix2_how\">How to fix it</h3><ol>\n<li data-list-item-id=\"e1e569729ec7ddb992a88e115bf2b6b13\">Go to your <strong>Phantom's</strong> setup.</li>\n<li data-list-item-id=\"e04c591699ae17e902fa4762ce55c0aff\">Check that the <strong>workspace URL field</strong> matches the workspace you want to automate.<ul>\n<li data-list-item-id=\"eb0c9b76a2a3f54f69b33bad2c4d88787\">Your workspace URL follows the format: <strong>yourworkspacename.slack.com</strong>\n</li>\n<li data-list-item-id=\"e161f02ea5d3c2a0e2ac345079100e3f4\">To find it, click your workspace name in the Slack sidebar and it will appear below the name.<br>→ See Slack's official guide: <a href=\"https://slack.com/intl/en-gb/help/articles/221769328-Locate-your-Slack-URL-or-ID\" target=\"_blank\" rel=\"noopener noreferrer\">Locate your Slack URL or ID</a>.</li>\n</ul>\n</li>\n<li data-list-item-id=\"eef0d4a7f5631837b7ec702244323e463\">Open the correct Slack workspace in your browser and make sure you're logged in.</li>\n<li data-list-item-id=\"e04b0cce06de6e8e4f10cf889bfa68caf\">Update your session cookie in your <strong>Phantom's settings</strong> with the one from the correct workspace.<br>→ If you're unsure how to do this, see <a href=\"https://support.phantombuster.com/hc/en-us/articles/360007071779-How-to-Connect-Instagram-Facebook-X-and-Other-Accounts-to-PhantomBuster#h_01JWBBPJPK7JHXYW8V99K225TM\" target=\"_blank\" rel=\"noopener noreferrer\">How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster</a>.</li>\n<li data-list-item-id=\"e52e8d63048e9fe63072472988d2f99d1\">Save your updated setup and relaunch.</li>\n</ol><figure class=\"wysiwyg-image\"><img style=\"aspect-ratio: 1391/643;\" src=\"https://support.phantombuster.com/hc/article_attachments/37049966088722\" alt=\"PhantomBuster Slack Phantom setup showing the workspace URL field and session cookie connection step\" width=\"1391\" height=\"643\"></figure><h2 id=\"h_session_cookie_fix3\">Fix 3: You're using a Facebook Phantom</h2><p>Facebook tracks both the <strong>IP location</strong> and the <strong>interface language</strong> of your session. If either drifts from your usual pattern, Facebook can flag the session, expire your cookie, or cause <strong>Phantoms</strong> to extract only partial results.</p><p><strong>To fix it:</strong></p><ul>\n<li data-list-item-id=\"e7bd8932117d8f86c14783c8e0f22cfb8\">\n<strong>Set a proxy close to your real location.</strong> In Advanced settings → Proxies, pick a <strong>PhantomBuster</strong> <strong>proxy</strong> with a fixed IP near you. Avoid the <strong>Anywhere</strong> default, it rotates across regions and causes mismatches. If no <strong>PhantomBuster</strong> location is close enough, use an external provider.<br>→ See <a href=\"https://support.phantombuster.com/hc/en-us/articles/360010769599-How-to-Use-a-Proxy-with-PhantomBuster\" target=\"_blank\" rel=\"noopener noreferrer\">How to Use a Proxy with PhantomBuster</a> for the full setup.</li>\n<li data-list-item-id=\"edf2d741b6d6791f5ff7376084de8feae\">\n<strong>Set your Facebook account language to English.</strong> Other languages cause <strong>Phantoms</strong> to extract only partial results (often 10 profiles) because popups and scrolling behavior expect English UI.</li>\n<li data-list-item-id=\"ef1c8b2980691f1ef7cddd9747cfa9c2a\">\n<strong>Verify the cookie actually updated.</strong> Open the launch logs from your two most recent runs and compare the session cookie values. If they're identical, the cookie wasn't refreshed, reconnect again.</li>\n</ul><p class=\"note-lightbulb\"><strong>Note for the Facebook Group Members Export:</strong> this <strong>Phantom</strong> scrolls extensively to load profiles, which can occasionally trigger session loss mid-run. Reconnecting with a fresh cookie usually clears it.</p><h2 id=\"h_session_cookie_prevent\">How to prevent session cookie errors</h2><p>Session cookies expire naturally, but a few habits keep them stable and reduce how often this error comes back:</p><ul>\n<li data-list-item-id=\"e35de2ca3e3100bcd485dcf35a2f5a24f\">\n<strong>Use the PhantomBuster browser extension</strong> instead of pasting cookies manually. It refreshes the session automatically and is the most reliable method.</li>\n<li data-list-item-id=\"e802e8663f4db20530de257aa15d040b2\">\n<strong>Stay logged in</strong> to your platform while <strong>automations</strong> run.</li>\n<li data-list-item-id=\"ef2190d3080ede79f960ba1401eedcfd0\">\n<strong>Respect platform rate limits</strong>: use <strong>Behavior</strong> settings that mimic natural user activity. See <a href=\"https://support.phantombuster.com/hc/en-us/articles/360017014479-PhantomBuster-Rate-Limits-Daily-Limits-by-Platform-and-Phantom\" target=\"_blank\" rel=\"noopener noreferrer\">PhantomBuster Rate Limits</a>.</li>\n<li data-list-item-id=\"ec5efb35cab8943f7bf39b8ec80bb2aac\">\n<strong>Avoid switching IPs or devices</strong> while your automation is running, or <a href=\"https://support.phantombuster.com/hc/en-us/articles/360010769599-How-to-Use-a-Proxy-with-PhantomBuster\" target=\"_blank\" rel=\"noopener noreferrer\">set up proxies</a> if needed.</li>\n<li data-list-item-id=\"e0da9aac4570b8ec1a0d6f7f9494b3be0\">\n<strong>Log in periodically</strong> to keep your session alive, especially if you run automations less often.</li>\n<li data-list-item-id=\"effbafbb2207b51a845faa29075e162ef\">\n<strong>Scale gradually</strong>: if you're new to automation or returning after a break, start with low volumes and increase slowly over time.</li>\n</ul><h2 id=\"h_session_cookie_faq\">Frequently asked questions</h2><h3 id=\"h_01KSQ606XME9VBK5HZC2GZVHN2\">What is a session cookie?</h3><p>A session cookie is a small piece of data <strong>PhantomBuster</strong> uses to stay connected to your LinkedIn, Instagram, Slack, or other platform account. It proves you're logged in without requiring your password.</p><h3 id=\"h_01KSQ60BBA5B7J7NH0YRJ2EJEQ\">Why does my session cookie keep expiring?</h3><p>Sessions expire for several reasons: manual logout, inactivity timeout, IP/device change, VPN use, or platform-initiated security resets. Running heavy automations or switching devices mid-run are the most common triggers.</p><h3 id=\"h_01KSQ60HD967P4NQHZA8WPV8ST\">What does \"exit code: 87\" mean?</h3><p>It's the specific error code <strong>PhantomBuster</strong> uses for invalid or expired session cookies. The fix is the same as for the other session cookie messages.</p><h3 id=\"h_01KSQ60P4A0KBP7V4R368H8CXT\">Can I refresh someone else's session cookie?</h3><p>Only if you have access to log into their platform account. Otherwise, they'll need to reconnect it themselves, or you can share access via a magic link (for LinkedIn).</p><h3 id=\"h_01KSQ60TC0Z58GJ9BNTTA1NKH9\">Why does my Slack Phantom fail even when my cookie looks right?</h3><p>Slack requires <strong>both</strong> a valid session cookie <strong>and</strong> a matching workspace URL. If you have multiple Slack workspaces and the cookie is from a different one than the URL field, the <strong>Phantom</strong> will fail.</p><h3 id=\"h_01KSQ60YS3TFJ8Z7GG2B3HR93M\">Why does my Facebook Phantom keep failing even with a fresh cookie?</h3><p>Facebook tracks both your IP location and account language. If your proxy isn't close to your real location (or is set to \"Anywhere\"), Facebook can flag the session and expire your cookie. Set a fixed <strong>PhantomBuster</strong> proxy in a nearby location, and make sure your Facebook account language is set to English.</p><h3 id=\"h_01KSQ613YH5A5EENV7F0EF61X3\">Why is my Facebook Phantom only returning 10 results?</h3><p>This usually means your Facebook account language isn't set to English. Facebook <strong>Phantoms</strong> rely on the English UI to navigate popups and scrolling behavior, other languages can break extracting and reduce the result count. Switch your Facebook language to English and relaunch.</p><h3 id=\"h_01KSQ619SFTSJZG69S1JSP9W73\">How do I prevent this from happening so often?</h3><p>Stay logged into your platform, respect rate limits, avoid switching IP addresses or devices during runs (or use a proxy), log in periodically to keep sessions alive, and scale your <strong>automation</strong> volume gradually.</p><h2 id=\"h_session_cookie_escalate\">If the error keeps showing up</h2><p>If you've tried both fixes above and the error keeps coming back, <a href=\"https://support.phantombuster.com/hc/en-us/requests/new\" target=\"_blank\" rel=\"noopener noreferrer\">get in touch</a> with our Customer Care Team. Include the <strong>Phantom</strong> name, the error message, and a recent launch log so we can investigate.</p>"}}