Go REST
F

Post comment always returns 'post must exist' error with 422 status code

Far over 1 year ago 3433 views 1 replies

Hello, I am trying to post comment via postman, already created user and post beforehand, and then I used the user id and post id to send the comment.

User ID: 7394263
Post ID: 154423 (got this after creating post with above User ID)

Post comment JSON

{
post_id: 154423,
name: Test User,
id: 7394263,
body: comment body,
email: E2yzUDYnTz@testdemo.com
}

Response returns 'post must exist' error message and 422 status code

Does anyone can help, what is missing/wrong with my post comment?
Any help is much appreciated, thank you!

1 reply
Z
zeevy over 1 year ago

POST /public/v2/posts/{POST_ID}/comments please try this, also make sure to send your token in headers,

post and post user must be created by you.

Your reply

Markdown supported