Skip to main content
Answer

SUB-533 Extension Presence Webhook Error

  • November 9, 2023
  • 3 replies
  • 159 views

Hi,

I'm trying to create a webhook subscription to receive DND status change events of a bunch of extensions an app needs to monitor using the event filter

 "/restapi/v1.0/account/{accountId}/extension/{extensionId}/presence/dnd"


The app is authenticated as the super user account that is trying to create the subscription but I am getting the error:

{
"errorCode": "SUB-533",
"message": "Not allowed subscribe for DnD status changes of another extension"
...
}

I'm hoping this isn't a hard set rule and there's a way to accomplish this because it would be really useful for us.

Thank you!

Best answer by PhongVu

I don't know the reason why a super admin user cannot subscribe for other extensions' /dnd event. But you can just subscribe for the "/restapi/v1.0/account/{accountId}/extension/{extensionId}/presence/" event and parse the payload to check the dndStatus of that user extension.

3 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • Answer
  • November 9, 2023

I don't know the reason why a super admin user cannot subscribe for other extensions' /dnd event. But you can just subscribe for the "/restapi/v1.0/account/{accountId}/extension/{extensionId}/presence/" event and parse the payload to check the dndStatus of that user extension.


  • Author
  • New Participant
  • November 9, 2023

Yes, but we would receive the presence notifications for any presence event which we are trying to avoid. We have a very specific use case that only cares about DND status change to respond when a user turns off department calls and do some background work. Having to process every presence event would be a huge waste of resources on the server.


  • Author
  • New Participant
  • November 9, 2023

I got it to work, I'm not sure how because it gave me an error but I noticed a notification come through and now when I list subscriptions I can see a few that failed and one that is active and sending notifications. Super admin does seem to work.