this post was submitted on 26 May 2024
6 points (100.0% liked)

Programming.dev Meta

2474 readers
2 users here now

Welcome to the Programming.Dev meta community!

This is a community for discussing things about programming.dev itself. Things like announcements, site help posts, site questions, etc. are all welcome here.

Links

Credits

founded 1 year ago
MODERATORS
 

Tried to use several different API endpoints as described in the link, but they all return 403 with a cloudflare "Just a moment..." html reply. Even tried copying an existing jwt token from a working logged-in browser but the same thing still happens.

Any idea what I could be doing wrong?

curl -v --request POST \
     --url https://programming.dev/api/v3/user/login \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"username_or_email": "redacted", "password": "redacted"}'
...
< HTTP/2 403
...
<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title>
...
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 5 months ago (1 children)

You're not passing cloudflares anti bot challenge. This is known to be a hard problem, as obviously CF is highly motivated to stop bots

[–] refalo 3 points 5 months ago (1 children)

then what is the point of allowing bots on lemmy if they can't work?

[–] [email protected] 1 points 5 months ago

Bots on Lemmy are allowed, that's why the API exists.
Bots on programming.dev seems are not allowed since all endpoints require to pass CF.