Topic: API doesn't work.

Posted under Site Bug Reports & Feature Requests

I've set up a user-agent and login + password_hash
I'm trying to use the API in my application, but I'm getting html code that requires a captcha.
How do I use the API without having to enter a captcha?

Updated by Pup

Pup

Privileged

Zebatuq said:
I've set up a user-agent and login + password_hash
I'm trying to use the API in my application, but I'm getting html code that requires a captcha.
How do I use the API without having to enter a captcha?

This was mentioned in an earlier thread:
https://e621.net/forum/show/268956

You're getting the captcha because your IP is considered low trust by cloudflare..

If you don't use a VPN, maybe try one of these, that apparently respect your privacy:
https://protonvpn.com/
https://hide.me/en/

You might get lucky and get an IP that isn't considered low trust, or if you already use a VPN, maybe try swapping to a different server.

Either that or you'd need to implement a way to be able to view and solve the captcha.

Updated by anonymous

I copied my User-Agent to a browser, passed the captcha, copied it to the Cookie "cf_clearance" request and everything works. This is strange.
If a service asks for a captcha - you have to ask the user to pass it in the built-in browser application using User-Agent and copy cookies from there?

Updated by anonymous

Pup

Privileged

Zebatuq said:
I copied my User-Agent to a browser, passed the captcha, copied it to the Cookie "cf_clearance" request and everything works. This is strange.
If a service asks for a captcha - you have to ask the user to pass it in the built-in browser application using User-Agent and copy cookies from there?

Most people don't get the captchas when using the API, they're only shown to IP addresses that Cloudflare decides are low trust, so more than likely if someone else used your application then it'd work ok.

The only way around copying the cookie, like you did, would be to integrate a web browser/viewer into your application so it could show the html and let the user solve the captcha. You'd then need to add code to store/handle the cookie/response as well.

If it's a console only app, then I don't think there's a way around it, other than adding a GUI popup for when a captcha needs to be solved..

Updated by anonymous

  • 1