Skip to main content

Toggle Comments

POST 

/instagram/page/toggleComments

This endpoint allows you to enable or disable comments on an Instagram post.

Settings:

SettingValue
URLhttps://api.99digital.co.il/instagram/page/toggleComments
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 do the action on: the mediaId you received from Create Post, or the post's id in All Postsyes15625364215_56994166514
enabled1 for allow comments. 0 for disable comments. If you leave it out, comments are allowed. true / false work too, as a number or a string; any other value returns reason 8no (default 1)1

Response:

{
"status": "OK",
"mediaId": "15234562345623_952362434423178",
"enabled": true,
"timestamp": 1600115719,
"from": "463745743546345",
"reason": 1
}

Response-Explain:

ParameterDescription
statusOK or FAIL
mediaIdThe media ID of the post you changed
timestampTime stamp of the message
fromYour ID for the service
enabledtrue if comments are now allowed on the post. false if they are disabled

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 is missing (or is not a valid media ID)
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)
8'enabled' is not 1 or 0 (or true / false)
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 media ID you provided is invalid or wrong: the post was not found, or it is not accessible
15Meta rejected the request: an invalid parameter, or a policy violation
18General error / wrong information or bad payload. Please check the payload again and 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.