this post was submitted on 02 Aug 2023
2 points (75.0% liked)

Lemmy.world Support

3201 readers
3 users here now

Lemmy.world Support

Welcome to the official Lemmy.world Support community! Post your issues or questions about Lemmy.world here.

This community is for issues related to the Lemmy World instance only. For Lemmy software requests or bug reports, please go to the Lemmy github page.

This community is subject to the rules defined here for lemmy.world.

To open a support ticket Static Badge


You can also DM https://lemmy.world/u/lwreport or email [email protected] (PGP Supported) if you need to reach our directly to the admin team.


Follow us for server news ๐Ÿ˜

Outages ๐Ÿ”ฅ

https://status.lemmy.world



founded 1 year ago
MODERATORS
 

Hi all,

I am trying to create a simple RSS-to-post bot. I am using IFTTT to do this. Anyways, I have had only mild success with the existing documentation and I am hoping you can help.

I am able to successfully login via Postman app with below URL and supplied JSON:

https://lemmy.world/api/v3/user/login

{
    "username_or_email": "bennysp",
    "password": "[REDACTED]",
    "totp_2fa_token": "[REDACTED]"
}

The problem is that I cannot find api documentation that seems to match curl/url responses using the auth token. I have stumbled my way through finding things like community and supplying an id via param, but I am simply guessing.

Example: (assumes you have jq installed)
curl -k -X GET https://lemmy.world/api/v3/community?id=23677 | jq .

I have done something like this on Mastodon pretty easily because I can get a token and just pass that as a header to the Webhook/curl.

Any help is appreciated.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 1 year ago* (last edited 1 year ago)

auth is optional for get_community, but if you wanted to include it, it's just

jwt="" # fill this in
curl https://lemmy.world/api/v3/auth=${jwt}&community?id=23677 | jq .

There's a post on [email protected] called "Basic Lemmy API "get unread replies" script" which uses the jwt for a endpoint that requires it.