Authentication
If you're logged into your account you can enter REST urls into your browser to create images / download designs / use stitch player. To integrate with web site and fullfillment process authentication will be required.
Backend Authentication
Set Authorization header to "LDWS " + username + ":" + BytesToHex(MD5(url+LicenseKey)).
So if your username is Bob1234 and your license key is 0123456789ABCDEF0123456780ABCDEF and url is http://api.livedesigner.com/Bob1234/GetImage/Lettering?alphabet=DIANE%20SCRIPT&text=Hello&color=ccaa00&dpi=32 Then the Authorization header would look like LDWS Bob1234:2849B1A705EC9554D78D506CC44A6447
you can get your LicenseKey from your ManageAccount page described here
Below is an example in C# demonstrating how to perform authorization on a Rest URL
Client.Headers.Add("Authorization", "LDWS "+username+":"+hash);
Ticket Authentication
if creating image urls from javascript or flash and wish to create and use urls without hitting backend then need to use ticket authentication. Ticket Autentication only works with Image files and Stitch Player. If wish to get design file need to use Authorization header method described above.
A) Backend
http://api.livedesigner.com/{yourusername}/GetImageTicket?date=yymmdd
where yymmdd is the year month and day ie (100122 = Jan. 22 2010)
- Returns an xml file which contains image ticket, image ticket will likely need to be escaped when placed in url.
- add to url in querystring ticket=
- pass authentication header described in #1 to url.
- This ticket can then be used to get images from either javascript or flash player.
- If wish to use in flash player you'll need to contact us to add your domain to our crossdomain.xml.
B) Javascript
You can alternately get an image ticket without modifying backend code using javascript.
To web service account management page add domain(s) you'd like to authorize for your account (ie. www.mysite.com and mysite.com)
To html page add script tag:
<script src="http://api.livedesigner.com/{yourusername}/LDWSAuthJS" type="text/javascript"></script>
Replace yourusername with your username.
Then when url dynamically created in javascript call function LDWSAddAuthToUrl (ie. newurl=LDWSAddAuthToUrl(url)). newurl will then have authentication ticket appended to it if your domain is correctly added.