Using WebUI API: Cannot add torrent, 400 Bad Request

Other platforms, generic questions.
Post Reply
Mars

Using WebUI API: Cannot add torrent, 400 Bad Request

Post by Mars »

I'm testing WebUI API using Talend, Got all the way until I reached add torrent API.
No matter what I send I always receive 400 Bad Request response.

Here is a sample containing minimum required parameters just for simplicity.
I ran tests with all parameters captured from qBittorrent own WebUI interface, same response
even though it worked with WebUI interface!

What have I missed or did wrong?

qBittorrent v4.5.2 / Windows 11 / Vivaldi 6.0.2979.15 + Talend extension
Also tried from https://reqbin.com same thing

Code: Select all

POST /api/v2/torrents/add HTTP/1.1
Origin: http://127.0.0.1:8080
Referer: http://127.0.0.1:8080
Cookie: SID=J41p5scN++6U2qmHv3wFf3BqCIUBlKZ7
Content-Length: 196
Content-Type: multipart/form-data; boundary=79376f0079804301a9a0991d88da59af
Host: 127.0.0.1:8080

--79376f0079804301a9a0991d88da59af
Content-Disposition: form-data; name="urls"

https://releases.ubuntu.com/22.04/ubuntu-22.04.2-live-server-amd64.iso.torrent
--79376f0079804301a9a0991d88da59af--

HTTP/1.1 400 Bad Request
connection: close
content-length: 0
date: Sun, 23 Apr 2023 07:27:48 GMT
Post Reply