How do I use Lemmy API for creating community?

http://community.xyz.com/api/v3/community/create

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

15 points · 11 comments · view on lemmy.world

11 Comments

nmtake@lemm.ee · 4 pts · 3y (5 replies)

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

akwebdev@lemmy.ml · 3 pts · 3y (4 replies)

It was the dummy, anyhow removed

Wyatt@lemmy.world · 1 pts · 3y (3 replies)

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

akwebdev@lemmy.ml · 1 pts · 3y (2 replies)

do you have thought on this post?

Wyatt@lemmy.world · 1 pts · 3y (1 reply)

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

akwebdev@lemmy.ml · 1 pts · 3y

It works thanks!

Jamie@jamie.moe · 3 pts · 3y (1 reply)

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

akwebdev@lemmy.ml · 2 pts · 3y

thanks, @jamie but unfortunately it is also not working