Can't Connect to Webhook

in Development
Hi folks,
I can't seem to connect to the webhooks endpoint with my key & secret pair.
The following is the response from the server:
{"error":{"code":401,"method":"READ","request":"\/en\/webhooks.json","message":"Could not authenticate you."}}
I am on the retail version, I am thinking I'll have to upgrade to the eCom version to gain this ability. But before I do I'd like to confirm that this is actually the issue.
Thanks!
5 comments
Hi {{ticket.requester.first_name}},
Thank you for contacting us.
Retail and eCom API are not similar, this means when you're hitting the eCom API you need eCom keys. You can't use your Retail keys to connect to eCom API.
Thank you Lucien. I just upgraded my access to ECOM.
Can you confirm which API would be the best one to use to get access to the webhooks that let me know if a new workorder is created?
Here's what I am trying to do.
When a work order is created, I want to send a notification to my server so that it can make a QR code and save it as an image. I will then print the QR code through a custom print template with lightspeed.
Would a ECOM webhook or Retail webhook be better to achieve this?
Hi @cboutros,
Can you confirm which API would be the best one to use to get access to the webhooks that let me know if a new workorder is created? Unfortunately we don't have webhooks for Retail. To get the workorders you need to create a cronjob to get it every 5 mins for example https://developers.lightspeedhq.com/retail/endpoints/Workorder/
Hi Lucien,
I've attached my application to the eCom webhook and registered an action to be fired on ticket creation, but when I create a ticket via a work order on the retail side, no action is fired.
I could be wrong, but shouldn't I be able to see the event? I know that retail does not provide this data, but shouldn't the eCom side be able to see that event?
That's just what I said above, we don't have webhooks for retail. We only have webhooks for eCom, so if an event is happening on the eCom side that will trigger a webhook. Please check https://developers.lightspeedhq.com/ecom/tutorials/webhooks/ for more information.