How could i use the API over the lemmy-js-client library?

I added my credentials and wanted to comment on a test post.

But when i execute client.createComment({content: text, post_id: Number(process.env.LEMMY_POST_ID), auth: “WHATTOPUTHERE?”})

FetchError: invalid json response body at https://lemmy.world/api/v3/user/login reason: Unexpected token J in JSON at position 0

I dont know if this instance “allows” api usage? or i missunderstood the api?

  • @RookiOPA
    link
    English
    11 year ago

    Btw this was correct.