Skip to main content

Create Comment

POST 

/instagram/page/createComment

This endpoint allows you to create a comment on an existing post.

You can either comment on the post itself (it is called "top level comment") or comment on a comment (it is called "reply comment").

Settings:

SettingValue
URLhttps://api.99digital.co.il/instagram/page/createComment
MethodJSON via POST
HeaderYour API key for the service (the apiKey header)

Body:

ParameterDescription / ExampleMandatoryExample
fromThe ID you received for the connectionyes463745743546345
mediaIdThe media ID you wish to comment on (if top level comment)no*15625364215_56994166514
commentIdThe comment ID you wish to comment on (if reply comment)no*652346734563_3463234623
bodyThe body of the comment. It can have plain text only and \n for a line break. Maximum 2,200 charactersyesThank you for the comment!

* You need to provide either the mediaId or the commentId, not both. If both are provided, the system will use the commentId (reply comment).

Response:

{
"status": "OK",
"commentId": "15234562345623_952362434423178",
"target": "15234562345623_425235245346",
"body": "Thank you for the comment!",
"timestamp": 1600115719,
"from": "463745743546345",
"reason": 1
}

Response-Explain:

ParameterDescription
statusOK or FAIL
targetThe original mediaId or commentId provided in the request (the commentId, if you sent both)
commentIdThe new commentId created. You can use it to reply to the comment
timestampTime stamp of the message
fromYour ID for the service
bodyThe comment you wrote

reason:

ValueInformation
1Not FAIL. The status is OK
2Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error
3Wrong apiKey (the apiKey header is missing or wrong)
4mediaId or commentId is missing (or is not a valid ID)
5Missing or invalid content: the 'body' is missing or empty
6Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint)
7The connection is not active (it was disabled)
8The "body" is more than 2,200 characters long
10You must do the onboarding again, the connection has expired
11A permission is missing: the connection does not have Meta's permission for this action
12Rate limit error. Too many requests. Please wait a few minutes and try again
13The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible
15The content you posted was rejected by Meta, or bad media / format / size, or an invalid parameter. It could also indicate a policy violation inside the content
18General error, try again

Request​

Responses​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.