Forum Discussion
- LiangYLithium Alumni (Retired)
As you know post needs the user to be logged in.
If you have already logged in and already have the session, just call the Rest Api to post: /boards/id/[id]/messages/post?message.subject="subject"&message.body="body"
It will be slightly different if your call is from outside community.You need to login first:
http:/yourcommunity.com/restapi/vc/authentication/sessions/login?user.login=username&user.password=password
get the session key from the response (sessionKey).and then post:
http:/yourcommunity.com/restapi/vc/boards/id/[id]/messages/post?message.subject="subject"&message.body="body"&restapi.session_key=sessionKey
Please find the detailed Api here:
http://community.lithium.com/t5/Community-API/bd-p/developers-rest-api?page=authentication
http://community.lithium.com/t5/Community-API/bd-p/developers-rest-api?leaf-id=Board.messages.post#Board.messages.post- darrynhContributor
Thank you for your reply,
I will need to first Login using code you gave but
What is the [id] is this the id of the post I am making and what should this value be. So say I have a board called favouriteLinks how would I get an [id]
Kind Regards
Darryn Hart
- LiangYLithium Alumni (Retired)
[id] is the board id where you want to post. You can read this article for how to get the id for category/board/blog.
- SuzieHKhoros Alumni (Retired)
- HaidongGLithium Alumni (Retired)
Hi barryhoffmann ,
my code here in Java which posts a discussion with an attachment, should be also useful for you.
cheers!
Related Content
- 4 years ago
- 11 years ago
- 9 years ago