Forums/API

How to send an appropriate request without using cURL?

Alexandra Ilyuhina
posted this on March 14, 2011 12:52 pm

Hi guys,

 

We are going to use LiveChat API to generate daily reports for LiveChat operators. It would be very suitable if we could do this directly from JScript, witout using additional tools. How can we authenticate from JScript without using cURL? Please provide us with a script example, if possible.

 

Thank you.

 

Comments

User photo
Alexander Muravyov

A little clarification to the question above: we know how to use XMLHTTP, but we are not sure where the API key goes when using cURL (request header, request body), or if cURL actually implements Integrated Windows Authentication based on the API key somehow.

Looking forward to hearing from Support.

March 15, 2011 12:46 pm
User photo
Bartosz Olchówka
LiveChat

Hello,
I'm not using the JScript on a daily basis, but I guess you could try with to the following URL (without passing any headers etc.):

https://LOGIN:API_KEY@api.livechatinc.com/METHOD

Note: make sure to replace @ sign with %40 in LOGIN part.


Please tell me if it worked for you, Alexander.

March 15, 2011 07:10 pm
User photo
Alexander Muravyov

Just tried this from a web browser, and it works fine! So, should work from JScript as well.

Thanks!

March 15, 2011 07:24 pm