Overview
This API is aimed toward developers and webmasters who may wish to leverage off of the 3Loves platform to help grow and develop their sites.
The API offers full use of the 3Loves customer base including all profile information, photos, video and audio. Full access to all 3Loves
functionality including the ability access and display media, view and display messages and winks, send messages and winks, view and display
customer and profile information and edit profile information.
This API is divided into two main groups of queries, public queries and private queries. As there names suggest a public query is a general query
for information from 3Loves like show the last 10 people who logged on, show the profiles for everyone who is online in Melbourne, Private queries
are queries against an individuals information and require appropriate authentication to access, for example update profile and change location or
get all new messages for a particular user.
To begin using the API you will need to
register for a 3Loves API Key.
Authentication
3Loves API Key
All access to the API is controlled via your 3Loves API Key which is needed to query the API. It is attached
to the querystring of the URL you are querying. The key is your gateway to the API. To obtain a key complete the
application form.
Example:
http://www.3loves.com.au/api/getprofile.aspx?apikey=12345
User Authentication
Authenticating access to a particular user so you can view and modify data on their behalf is done using HTTP Basic Authentication.
This form of authentication is originally defined in
RFC 1945, further reading and security
issues may be found in
RFC 2616 and
RFC 2617.
The basic authentication scheme requires the request to contain the user credentials in the header. The structure of the user
credentials in the header is:
[userid] = [username]:[password]
[userid] is then encoded as a sequence of base-64 encoded characters
Example:
username "Aladdin" and password "open Sesame" would be combined as "Aladdin:Open Sesame" - which is encoded to QWxhZGRpbjpvcGVuIHNlc2FtZQ==. This encoded
string is passed in the HTTP header of the request
GET /api/addmessage.aspx?apikey=12345 HTTP/1.0
Host: 3loves
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
This authentication needs to be passed with each request to a private query in the API.
We are looking further into a token authentication
mechanism similar to the one used in the Google code API's, but for now this is the only supported user authentication model.