I’m toying about with writing a client in Rust.

Example code online uses the API endpoint https://lemmy.ml/api/v3/post/list, and when I go to this link in a browser, it doe indeed load data. However, when I try to load it from a program, it gives me a 403 Forbidden. Does anyone know why this could be?

(code)

  • 𝒍𝒆𝒎𝒂𝒏𝒏
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Not familiar with Lemmy’s API specifically but you might need to be logged in for that…

    Do you get a 403 when using a private browser window, logged out of lemmy?

    • SubArcticTundra@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      1 year ago

      Oh, didn’t think of this. True I did make the request from the browser that I use to browse Lemmy. Edit: Nope, wtill loads in Incognito… 🤔