Forum Discussion
Trying to add a webhook returns Bad Request
We're trying to integrate with the Reach 360 api. I've tried following their documentation on creating a webhook to be notified when a learner completes a course, but when I try to post the following json to the create endpoint I get a bad request response. Support said they can't troubleshoot it and to ask here, so hopefully someone might have an idea.
{
"id": "",
"url": "",
"targetUrl": "https://ourwebapp.com/callbackreach360",
"events": [
"course.completed"
]
}
And this is the documentation I'm following - https://access.articulate.com/support/article/Reach-360-Webhooks-API#create
Thanks.
- SBP_IncCommunity Member
Have you tried the List Webhooks API call in Postman or similar tool to make sure you have the correct API credentials for starters? And I would double check the JSON payload against the documentation especially the URL parameter, as I read the documentation differently
- gswartzCommunity Member
Yes the api credentials are correct and working for every other api endpoint we're calling. I tried the list webhooks endpoint and it worked. The id and url look like properties returned in the response so I had them in the request since my DTO being used was going to be the same type. I removed the id and url from the class and then it went through properly. It's interesting because I swear I started without those properties and still got the bad request, which made me wonder if I need to have them on the json object being sent over. Anyway, it worked so we're good. Thanks for trying to help.