Abuseipdb workflow

curl:

curl https://api.abuseipdb.com/api/v2/report \
  --data-urlencode "ip=127.0.0.1" \
  -d categories=18,22 \
  --data-urlencode "comment=SSH login attempts with user root." \
  --data-urlencode "timestamp=2023-10-18T11:25:11-04:00" \
  -H "Key: YOUR_OWN_API_KEY" \
  -H "Accept: application/json"

response:

  {
    "data": {
      "ipAddress": "127.0.0.1",
      "abuseConfidenceScore": 52
    }
  }

I tried to implement above curl in n8n instead of curl with following workflow.

But I get following error:

Method not allowed - please check you are using the right HTTP method
Invalid HTTP method for this endpoint. Refer to APIv2 docs for allowed method.

What should I do?

The issue in your case is that you are using GET request instead of a POST. Change the method inside the HTTP Request node.

(Note: If you are wondering why, the presence of -d or --data-urlencode flags in curl automatically turns the request method to POST (unless overridden by -X)).

This is what the method is also telling you:
Method not allowed - please check you are using the right HTTP method

means you are using GET and you probably shouldn’t.

2 Likes

If this helped solve your problem, kindly mark as solution.

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