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.
A session cookie is what PhantomBuster 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 automation can't run until the connection is refreshed.
Why you're seeing this
Your automation may show one of these messages during execution:
- "Expired session cookie"
- "Invalid session cookie"
- "exit code: 87"
- "Could not connect to Slack with this session cookie / workspace URL"
- "Could not connect to this Slack workspace, already signed in."
All of these mean PhantomBuster can't access your connected account. The cause varies, use the sections below to find your situation and fix it.
Fix 1: Your session cookie expired or became invalid
This is the most common case. It happens when:
- You logged out of the platform manually or were logged out automatically.
- Your session expired after a period of inactivity.
- You switched IP address, used a VPN, or changed device.
- The platform reset your session for security reasons.
If it's your own account
- Go to the PhantomBuster Dashboard and locate the automation showing the error.
➔ It will display a warning icon where your platform identity usually appears, along with an error tag. - Click on the error to open the Phantom console.
- Inside the console, click Resolve.
➔ This button appears when the session cookie is expired or invalid and points you directly to the account that needs to be refreshed. - You'll be redirected to its Setup page.
➔ The affected account will be highlighted, and you can click Re-connect next to your LinkedIn account. - Save your updated setup.
Your automation can now run again.
If you need step-by-step guidance on reconnecting your account, see:
- How to Install and Use the PhantomBuster Browser Extension (recommended method)
- How to Connect Your LinkedIn Account to PhantomBuster
- How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster
If the account belongs to someone else
The session has to be refreshed from the account owner's side. You have two options:
- They can reconnect it themselves using the PhantomBuster browser extension or by pasting a fresh cookie.
- You log into their account (for example, in a private window with the extension enabled) and reconnect it.
- For LinkedIn accounts shared via magic link, generate a new magic link so they can refresh their session securely without sharing credentials.
➔ See workspace members and magic links in How to Connect Your LinkedIn Account to PhantomBuster, or How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster for other platforms.
Once the session is refreshed, the automation will work again.
Fix 2: You're using a Slack Phantom
Slack Phantoms require both a valid session cookie and a correct workspace URL.
If either doesn't match the workspace you're trying to automate, the Phantom won't be able to connect.
A common cause is having multiple Slack workspaces and using the cookie or URL from the wrong one.
How to fix it
- Go to your Phantom's setup.
- Check that the workspace URL field matches the workspace you want to automate.
- Your workspace URL follows the format: yourworkspacename.slack.com
- To find it, click your workspace name in the Slack sidebar and it will appear below the name.
→ See Slack's official guide: Locate your Slack URL or ID.
- Open the correct Slack workspace in your browser and make sure you're logged in.
- Update your session cookie in your Phantom's settings with the one from the correct workspace.
→ If you're unsure how to do this, see How to Connect Instagram, Facebook, X, and Other Accounts to PhantomBuster. - Save your updated setup and relaunch.
Fix 3: You're using a Facebook Phantom
Facebook tracks both the IP location and the interface language of your session. If either drifts from your usual pattern, Facebook can flag the session, expire your cookie, or cause Phantoms to extract only partial results.
To fix it:
-
Set a proxy close to your real location. In Advanced settings → Proxies, pick a PhantomBuster proxy with a fixed IP near you. Avoid the Anywhere default, it rotates across regions and causes mismatches. If no PhantomBuster location is close enough, use an external provider.
→ See How to Use a Proxy with PhantomBuster for the full setup. - Set your Facebook account language to English. Other languages cause Phantoms to extract only partial results (often 10 profiles) because popups and scrolling behavior expect English UI.
- Verify the cookie actually updated. 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.
Note for the Facebook Group Members Export: this Phantom scrolls extensively to load profiles, which can occasionally trigger session loss mid-run. Reconnecting with a fresh cookie usually clears it.
How to prevent session cookie errors
Session cookies expire naturally, but a few habits keep them stable and reduce how often this error comes back:
- Use the PhantomBuster browser extension instead of pasting cookies manually. It refreshes the session automatically and is the most reliable method.
- Stay logged in to your platform while automations run.
- Respect platform rate limits: use Behavior settings that mimic natural user activity. See PhantomBuster Rate Limits.
- Avoid switching IPs or devices while your automation is running, or set up proxies if needed.
- Log in periodically to keep your session alive, especially if you run automations less often.
- Scale gradually: if you're new to automation or returning after a break, start with low volumes and increase slowly over time.
Frequently asked questions
What is a session cookie?
A session cookie is a small piece of data PhantomBuster uses to stay connected to your LinkedIn, Instagram, Slack, or other platform account. It proves you're logged in without requiring your password.
Why does my session cookie keep expiring?
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.
What does "exit code: 87" mean?
It's the specific error code PhantomBuster uses for invalid or expired session cookies. The fix is the same as for the other session cookie messages.
Can I refresh someone else's session cookie?
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).
Why does my Slack Phantom fail even when my cookie looks right?
Slack requires both a valid session cookie and a matching workspace URL. If you have multiple Slack workspaces and the cookie is from a different one than the URL field, the Phantom will fail.
Why does my Facebook Phantom keep failing even with a fresh cookie?
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 PhantomBuster proxy in a nearby location, and make sure your Facebook account language is set to English.
Why is my Facebook Phantom only returning 10 results?
This usually means your Facebook account language isn't set to English. Facebook Phantoms 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.
How do I prevent this from happening so often?
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 automation volume gradually.
If the error keeps showing up
If you've tried both fixes above and the error keeps coming back, get in touch with our Customer Care Team. Include the Phantom name, the error message, and a recent launch log so we can investigate.