livechat / api-client-csharp Goto Github PK
View Code? Open in Web Editor NEWC# library with ready-to-use LiveChat API implementation.
C# library with ready-to-use LiveChat API implementation.
Hi - I am getting an error implementing the chat test method. I think it might be that I need the actual sessionID, but I am not sure how to get that.
public async Task ChatTest()
{
Console.WriteLine("Start chat");
string visitorID = "S1415110640.63935a25f1";
string licenseID = "my_license_id";
string welcomeMessage = "Hello";
string result = await Api.Chat.StartChat(visitorID, licenseID, welcomeMessage);
Console.WriteLine(result);
Console.ReadLine();
Console.WriteLine("Get pending messages");
string sessionID = "CS1449238356.e911a7da96";
result = await Api.Chat.GetPendingMessages(visitorID, licenseID, sessionID);
Console.WriteLine(result);
Console.ReadLine();
Console.WriteLine("Send message");
string message = "new message";
result = await Api.Chat.SendMessage(visitorID, licenseID, sessionID, message);
Console.WriteLine(result);
Console.ReadLine();
Console.WriteLine("Close chat");
result = await Api.Chat.CloseChat(visitorID, licenseID, sessionID);
Console.WriteLine(result);
Console.WriteLine("");
}
Hello,
As api v2 is deprecated which was working with api key and there is no place to get the api key anymore in the user login area of your site, I tried to find a new client which is suitable for api v3 but unfortunately there is no one. I have read your documentation of api v3 and it's showing curl commands. I cloned them in postman and it returned response but when I am trying to clone same webrequest in my c# application, it throws StatusCode: 422, ReasonPhrase: 'Unprocessable Entity' error.
I have managed to connect to LiveChat API using C# with my account and access key. I have included the LiveChat API in a c# project. What I want to really do is get access to chats by other agents so i can store them in data structures and push to my server. I tried this code from your documentation and added a option to the menu list called getResponses but it still does not work. Can you help me out in getting access to chat messages by each agent through the API??
`
public async Task Getresponses()
{
Dictionary<string, string> parameters = new Dictionary<string, string>();
parameters.Add("date_from", "2017-10-27");
parameters.Add("query", "test");
string result = await Api.Archives.Get(parameters);
return await Api.Get(result);
}
`
I am attempting to use the livechat API to add custom visistor details as described here: https://developers.livechatinc.com/rest-api/#add-custom-visitor-details
When I use the Visitors.AddCustomDetails() method it returns "{"result":"Visitor details added"}" however the fields are not displayed when viewing the visitor on the web portal.
I fields are also not visible on the visitor when returned from the Visitors.List() method.
Please could you advise.
Thanks,
Chris Fitz-Avon
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.