Webhooks V2 trigger error
Hi All,
I have run below code in cURL to create triggers on a folder but getting error. I am not sure what is wrong here. I am not expert with these just trying to follow the steps metioned in help. Please let me know how to fix it. (I did replace devloper token and target_ID)
curl https://api.box.com/2.0/webhooks \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" -X POST \
-d '{"target": {"id": "", "type": "folder"}, "address": "", "triggers": ["FILE.UPLOADED","FILE.DOWNLOADED"]}'
Error :
{"type":"error","status":400,"code":"bad_request","context_info":{"errors":[{"reason":"invalid_parameter","name":"entity-body","message":"Invalid value '{target: {id: 54XXXXXXXX, type: folder}, address: http:\/\/localhost:8080\/test\/api\/v1\/cases, triggers: [FILE.UPLOADED,FILE.DOWNLOADED]}'. Entity body should be a correctly nested resource attribute name\/value pair"}]},"help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Bad Request","request_id":"16327ghjgjghghg76876"}'
-
Tried again by using Postman but I get another error now:
{
"type": "error",
"status": 400,
"code": "bad_request",
"context_info": {
"errors": [
{
"reason": "missing_parameter",
"name": "targetId",
"message": "'targetId' is required"
},
{
"reason": "missing_parameter",
"name": "targetType",
"message": "'targetType' is required"
}
]
},
"help_url": "http://developers.box.com/docs/#errors",
"message": "Bad Request",
"request_id": "jr1wb7frmlz430an"
}
Please sign in to leave a comment.
Comments
2 comments