Connect your Phantom via session cookies

To take action on your behalf on a social network, PhantomBuster needs to connect as you. To do this, it needs your session cookies. This will give the Phantom access to your social network account.


- What are session cookies?

- Get your cookies using PhantomBuster's browser extension

- Get your cookies manually

- Get your browser user agent manually (for LinkedIn and Sales Navigator Phantoms and Flows)

What are session cookies?

A session cookie is a small piece of data that a website sends to your web browser while you are visiting a site. These cookies are designed to be temporary and are typically stored in your browser's memory only during your ongoing session.

Every time you log into your social network account, a new cookie is created for that "session" of time that you remain logged into the account.

If you log out or are disconnected, the cookie expires. A new cookie is automatically generated once you log in again. 

Phantoms are able to connect and automate on your behalf with these cookies.

Don't worry! PhantomBuster doesn't know your password, nor your email address, and these cookies reset when you manually log out of a website.

Get your cookies using PhantomBuster's browser extension

To make your life a little bit easier, we've got a browser extension which will automatically retrieve your cookies for you. You can install this directly from your PhantomBuster account by clicking the "Install extension" button in the banner at the top: 


Alternatively, you can find it within the Phantom's setup:


Or find it directly in the extensions store, here for Chrome or here for Firefox.

The extension will work for all Phantoms and social networks on our store, so you only have to install it once. Once you've done this, refresh the page of your Phantom's setup and you'll see a new "Connect to..." button:


Simply click it, and your cookie and the user browser agent will populate the box automatically! It'll look something like this:


Important note:

LinkedIn/Sales Navigator Phantoms and Flows now require a browser user agent to ensure a stable connection. Your browser user agent will get automatically populated if you're using the extension. If you're automating on someone else's behalf or via API, check below to find out how to find your browser agent manually.

Get your cookies manually

This tutorial is written for Chrome users. Here's how to access your cookies with Firefox or Safari.

Open a new tab and go to the website which you want your cookies for. Right-click anywhere on the page and open "Inspect": 


Locate the "Application" tab. Then select "Cookies" > "". Locate the cookie you're looking for (so, for example, for LinkedIn you'll be looking for the "li_at" value):


Copy this and paste it back into the relevant field in your Phantom's setup.

The table below contains each social network's cookie name should you need to find them:


Get your browser user agent manually (for LinkedIn and Sales Navigator Phantoms and Flows)

Here's how to find the browser user agent directly inside the browser:

1. Type: "my browser user agent";

2. Copy the result to the Phantom settings:


Please note that the browser user agent and session cookie must be obtained from exactly the same browser.

You're all set!

Take note: make sure not to manually log out of the site you've retrieved your cookie for, as this will cause it to expire, as well as not taking the necessary automation rate limits into account. 

If your session cookies are not working, check out this article.


If you think this article does not address your issue, please contact Support directly. We are continuously improving, so your feedback means the world to us!

Was this article helpful?
86 out of 172 found this helpful