Skip to content

Instantly share code, notes, and snippets.

@flrent
Created November 11, 2013 14:32
Show Gist options
  • Save flrent/7414020 to your computer and use it in GitHub Desktop.
Save flrent/7414020 to your computer and use it in GitHub Desktop.
Post a ticket to uservoice with node
var UserVoice = require('uservoice');
var uservoiceRequest = new UserVoice(CONSUMER_KEY, CONSUMER_SECRET, ACCOUNT_SUBDOMAIN);
var data = {
email: contact.email,
ticket: {
subject:'Subject',
message: "Message",
referrer: 'refferer'
}
};
uservoiceRequest.post({
url:"tickets.json",
data:data
}, function (err, ticketsResp) {
if (err) {
console.log(err);
}
return console.log(ticketsResp);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment