Mattermost Peer-to-Peer Forum

Problem with creating a post only. Other APIs are working fine


#1

Hi all,

The other APIs are working for me except for the create a post API version 4 (https://documenter.getpostman.com/view/4508214/RW8FERUn#130b2a40-e787-4bad-9753-eae9c6095077).

Here is an image of the Postman app settings i’m using. Please help me understand the mistake i’m making. It keeps stating “Invalid or missing post in request body”.


#2

Hi @talksonweb,

Our official API guide is here: https://api.mattermost.com/#tag/posts. It also includes information about the error message you’re seeing. Would you be open to taking a look and then letting us know if this helps?


#4

I knew about this doc. I had used this for the other APIs.

The above API is the one i’m having problem with. Can you please guide me on this?

I’m providing the two required parameters but getting back an error message.


#5

Hi, @talksonweb

I had this tested on my end and I was able to make it work by specifying the Content-Type header to application/json and set the Body content to Raw as per the screen shot that you can see below:

As a result, you can see that the message was sent successfully:

Can you please give it a try on your end and let me know how it goes? Thanks.