this post was submitted on 17 Jul 2023
14 points (88.9% liked)

Lemmy Support

4652 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

I have installed the Lemmy using docker. I need to use API to create a community but it is not allowing me to POST the data. I followed all the steps which is required for creating community using API. Below are the steps I am using for creating a community. Using POSTMAN Headers : Content-Type : application/json

Body parameters name: testing title: testing auth: string

top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago* (last edited 1 year ago) (1 children)

You shouldn't post the auth value here - it works like a username and password.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

It was the dummy, anyhow removed

[–] [email protected] 1 points 1 year ago (1 children)

He meant remove it from the post, anyone can use it to make requests to your server lol

[–] [email protected] 1 points 1 year ago (1 children)

do you have thought on this post?

[–] [email protected] 1 points 1 year ago (1 children)

The guy below was right. Your hitting the wrong url. If that didn’t fix it, it’s probably your postman set up. Does curl work? Ex:

curl -i -H
"Content-Type: application/json"
-X POST
-d '{ "auth": "you key", "name": "some name", "title": "some name" }'
https://someurl.com/api/v3/community

[–] [email protected] 1 points 1 year ago

It works thanks!

[–] [email protected] 3 points 1 year ago (1 children)

From what it looks like, you're calling on /community/create, the API docs show it's just /community.

[–] [email protected] 2 points 1 year ago

thanks, @jamie but unfortunately it is also not working

load more comments
view more: next ›