Webhook Won't Post

I am attempting for a webhook triggered in Freshdesk to POST to my logistics provider’s API (it won’t…POST that is).

I’ve tested it successfully in Python from the command line on my machine but no such luck with Freshdesk so I’m assuming it has to do with the custom header portion as I know the payload is good. Logistics API is looking for 3 headers and I found this here - Using webhooks in automation rules that run on ticket updates : Freshdesk - that you can’t separate them by commas but that’s the only way I didn’t get a “Please enter a valid json” error like here -

image

Any assistance in tackling this header please? And we don’t have a way to catch the response so we can grab some info on what went wrong I presume (without writing a whole Freshdesk app :slight_smile: )?

1 Like

just in case it wasn’t clear, yes I had my api_key in there, just didn’t feel like posting it obviously :slight_smile:

1 Like

Jay,

I understand what you are trying to accomplish. Thanks for elaborating scenario enough.

Currently, on this forum we only have experts from who can assist with SDK or with some extended help, we can work to get help on REST APIs that :freshdesk: provides. Did you try raising a ticket at support@freshdesk.com?

The current topic however seems to be integral to Freshdesk Product itself for which we don’t have active contributors. You could be hopeful if someone from the community could add their thoughts.

Nevertheless, please feel free to create topics on this subject. That could indicate us finding dedicated help to bring on this forum.

Welcome to the community! Seems like this is your first post here :tada:

Ha I chatted with them earlier and they pointed me here! Does seem like it’d be in their bailiwick though; sent them an email.

I’m hoping I won’t have to build an app to end up making this happen because yes, I’d imagine that would lead to several more posts :slight_smile:

Thanks for your reply, Saif.

Cheers,
Jay

Well, the json in header does seem to be invalid.
Try this:

{
	"Authorization": "Bearer xxx",
	"Cache-Control": "no-cache",
	"Content-Type": "application/json"
}
1 Like

Thanks, Samuel. Yeah, that was what I initially tried and with it not working, that’s when I found the info at that link above saying they can’t be delimited with commas (doesn’t say what they should be delimited with). So who knows, wish there was a way for Freshdesk to capture the response so we could learn a little bit about what’s happening. Thinking I’m going to have to give it a go building an app to get that kind of info.

I tested it and it worked. Look below:

Configuration:

Putsreq

2 Likes

Nice, thanks man; good to have that confirmation of commas working. WIth it still not POSTing to where I’m sending it, the only thing I can think to do is to code it so I can get a look at the response and try to figure out what’s happening. Works perfectly from my command line but port that exactly into that Freshdesk webhook…no dice. Let me know if you think I should go about it any differently? And I’ll google the Freshdesk SDK for REST API examples but if you have anything handy you’d recommend, if you could please share?

Thanks again, Samuel.

Happy Holidays,
Jay

Jay,

From what you told me so far, the only thing I can think off is that your automation rule is not being fired by not matching all the criteria you configured. If I not mistaken, when a webhook call fails due server response, an email is sent to the account administrator. So if you are not receiving this email, I would say that the action is not even being called. To test it properly, configure this webhook with just the rule of ticket creation, without any other criteria, then you just create a ticket to test it. This way you will know for sure what’s happening.

3 Likes