Topic: iqdb_queries using file fail when called as API

Posted under Site Bug Reports & Feature Requests

e621.net/iqdb_queries.json doesn't seem to accept multipart form with file with it, always returns an error.
The only thing that works is e621.net/iqdb_queries.json?url= as long it's not e621 address. otherwise it errors out as well.

I've looked closer at this and discovered, that a POST request to /iqdb_queries.json requires authenticity_token parameter, the same that is in HTML form on https://e621.net/iqdb_queries. It doesn't require authorization, but the token must match your session cookie.

Of course, this is not how API calls should be made and there's something wrong with this endpoint. I guess the POST method has not been adapted to use with the API, and server handles the requests like the ones from HTML form.
I hope this will be fixed, since E6's IQDB (like no other) doesn't allow URLs from domains that are not whitelisted and file upload remains the only way.

ebea57 said:
I've looked closer at this and discovered, that a POST request to /iqdb_queries.json requires authenticity_token parameter, the same that is in HTML form on https://e621.net/iqdb_queries. It doesn't require authorization, but the token must match your session cookie.

It does not (when checking url).

  • 1