I am developing an application in ASP.NET MVC5 using Zendesk_v2 (loaded using the nuget package). I have administrator rights for the easynext.zendesk.com subdomain.
Here is my code for creating a ticket:
private static string requestUri = "https://easynext.zendesk.com/api/v2/tickets.json";
private static string _username = "gbalasel@easynext.be";
private static string _password = "MYPASSWORD";
private static ZendeskApi apiZendesk = new ZendeskApi(requestUri, _username, _password, "");
private void CréerTicketZendesk() {
var myTicket = apiZendesk.Tickets.CreateTicket(new Ticket()
{
Subject = "test ticket",
Priority = TicketPriorities.Low
});
}
This code is sending me an error 422 Unprocessable Entity.
I also made a test account for the client in Zendesk, and the method works fine, the ticket was created in Zendesk, and I also get it in my email account.
source
share