how to get local posts and posts from subscribed communities? (lemmy fetch api) [SOLVED]

question is solved! answer: add type_ parameter at /post/list endpoint.
example: https://lemmy.world/api/v3/post/list?type_=Local for local posts

7 points · 2 comments · view on lemmy.world

2 Comments

ptz@dubvee.org · 6 pts · 1y (1 reply)

Use the type_ parameter when calling /api/v3/post/list:

Local: /api/v3/post/list?type_=Local

Subscribed /api/v3/post/list?type_=Subscribed

Local will work without auth, but you will need to pass the auth token for "Subscribed". Without auth, "Subscribed" is the same as "All".

okelote360@lemmy.world · 1 pts · 1y

thank you very much! :D