ANapSoundsNice,
@ANapSoundsNice@beehaw.org avatar

Sorry for the late response to my other comment - I also was reading through the documentation for the first time and it looks like you got the answer ahead of me, nice!

I whipped up some sample code that does exactly the same thing you ended up doing, so no further additions here except that in the Lemmy API is expecting requests to be sent to <instance domain>/api/v3/... .

I used my code that is basically the same to what you have above here, but when I switched it to v1 the server throws an 400 error (malformed request). So if you haven't ran this code already you've got my sanity check that it will work except for making sure you change the api version. You can then carry that auth token with you when making requests by including it in the header like so

headers = {
  'Content-Type': 'application/json'
  'auth': '<jwt goes here>'
}

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@beehaw.org
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • everett
  • anitta
  • slotface
  • GTA5RPClips
  • rosin
  • thenastyranch
  • kavyap
  • tacticalgear
  • modclub
  • JUstTest
  • osvaldo12
  • Durango
  • khanakhh
  • provamag3
  • cisconetworking
  • ngwrru68w68
  • cubers
  • tester
  • ethstaker
  • megavids
  • normalnudes
  • Leos
  • lostlight
  • All magazines