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:
| Setting | Value |
|---|---|
| URL | https://api.99digital.co.il/instagram/page/createComment |
| Method | JSON via POST |
| Header | Your API key for the service (the apiKey header) |
Body:
| Parameter | Description / Example | Mandatory | Example |
|---|---|---|---|
| from | The ID you received for the connection | yes | 463745743546345 |
| mediaId | The media ID you wish to comment on (if top level comment) | no* | 15625364215_56994166514 |
| commentId | The comment ID you wish to comment on (if reply comment) | no* | 652346734563_3463234623 |
| body | The body of the comment. It can have plain text only and \n for a line break. Maximum 2,200 characters | yes | Thank 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:
| Parameter | Description |
|---|---|
| status | OK or FAIL |
| target | The original mediaId or commentId provided in the request (the commentId, if you sent both) |
| commentId | The new commentId created. You can use it to reply to the comment |
| timestamp | Time stamp of the message |
| from | Your ID for the service |
| body | The comment you wrote |
reason:
| Value | Information |
|---|---|
| 1 | Not FAIL. The status is OK |
| 2 | Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error |
| 3 | Wrong apiKey (the apiKey header is missing or wrong) |
| 4 | mediaId or commentId is missing (or is not a valid ID) |
| 5 | Missing or invalid content: the 'body' is missing or empty |
| 6 | Wrong 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) |
| 7 | The connection is not active (it was disabled) |
| 8 | The "body" is more than 2,200 characters long |
| 10 | You must do the onboarding again, the connection has expired |
| 11 | A permission is missing: the connection does not have Meta's permission for this action |
| 12 | Rate limit error. Too many requests. Please wait a few minutes and try again |
| 13 | The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible |
| 15 | The 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 |
| 18 | General error, try again |
Request
Responses
- 200
The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.