Set up custom Web / Service Hooks
While our API lets you pull information from your UserVoice account, Web Hooks will allow you to push UserVoice events (e.g. new tickets) to any URL.
Here's how to set up a custom Web Hook in UserVoice admin console:
- Sign in to your Admin Console.
- Click on "Settings" in the Admin Header.
- Choose "Integrations" from the drop down menu.
- Scroll down to the Service Hooks section. You will either see an icon that says "Web Hook" or a link "Custom web hook." Click on it to set up.
The following events can be pushed:
- New Ticket
- New Ticket Reply
- New Kudo
- New Published Article
- New Forum
- New Suggestion
- New Comment
- New Suggestion Status Update
Please then specify how our API will be polled (either XML or JSON).
Finally, enter the Callback URL. Don’t forget to click Create at the bottom to save your settings!
In addition to reading the 'data' parameter (JSON or XML) in your application, you might want to check the 'signature' parameter if you want to make sure the request is coming from UserVoice. To calculate the signature, use HMAC-SHA256 with your SSO key (in Admin Console Settings -> General -> UserVoice Authentication -> Edit, copy-paste SSO KEY) as the key and 'data' as the message.
If you run a web application or service and you'd like your customers to be able to push their UserVoice events into your app, check out our uservoice-service-hooks repository on GitHub. Our service hooks are just simple Ruby classes that define a few user-configurable fields, provide messages for our different event types and include a method for shipping the data off to your app. Just fork that repo, write a Service Hook and some tests, and submit a pull request!