Session Cookie

Hi everyone,

I’m currently working on an n8n workflow that integrates with PhantomBuster to automate data scraping. However, I’m running into an issue with the sessionCookie parameter in my API requests.

Here’s what I’m trying to achieve:

  1. Launch a PhantomBuster agent using a POST request.
  2. Fetch the output of the agent using a GET request.

Here’s the relevant JSON for launching the agent:

json

Copy code

{
  "search": "{{ $json.Link }}",
  "sessionCookie": "AQEDAT1-SEQDuTd-AAABkXOXS4wAAAGRl6PPjE4AtiNOlVuSTGrILlu_LUe3M3ii3AcDYAxBT6HlJdf7DlQ2G44CSdzwvSNjnbANIbmvaiY7Iq8-ndFmJ9mP8jjhhTXwjyhvSbXpAaaMXDS7xq8XVUlZ"
}

And here’s the request for fetching the output:

json

Copy code

{
  "url": "https://api.phantombuster.com/api/v2/agents/fetch-output",
  "queryParameters": {
    "id": "7455715727685578"
  }
}

Issue:

I’m receiving an error indicating that the sessionCookie might be incorrect, even though I’ve manually verified it.
The output of the agent is not being fetched as expected.

Steps I’ve Taken:

  1. Verified the sessionCookie and ensured it is correct and not expired.
  2. Checked the API documentation to confirm that all required parameters are included.
  3. Tried manually testing the API calls outside of n8n.

Request for Help:

Can someone help me identify if there’s an issue with how I’m sending the sessionCookie in the request?
Are there any additional steps I should take to troubleshoot this issue?

Thanks in advance for your assistance!

here is the workflow :

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Rohit_Gurav,

Any particular reason why you’re using the HTTP Request node and not the Phantombuster node for these two actions? - PhantomBuster | n8n Docs
And if not, have you tried with the node? Does the issue persist with it?

You mentioned that you tried to manually call the API outside of n8n - were these calls successful?

What version of n8n are you using?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.