Web-Requests



Device-Registration

To be able to upload content to your online clipboard library, you have to get an access token. This is not as difficult as it sounds to be.

You have to ask the user for his username and his password - BUT: never save these credentials!

http://quickclip.heinemann.at/api/getaccesscode.php?name=USERNAME&password=PASSWORD

The respons will look like that:

ACCESSCODE|DEVICEID

Split them with the "|-Char"

For further actions you have to save these two variables (accesscode and deviceID).

Upload Clipboard-Data

You need upload requests to upload your clipboard to the server.

It's almost the simpliest part:

http://quickclip.heinemann.at/api/upload.php?accesscode=ACCESSCODE&id=DEVICEID&content=YOURUPLOAD&htmlcontent=HTMLCLIPBOARD

Or if you want to upload an image:

http://quickclip.heinemann.at/api/upload.php?accesscode=ACCESSCODE&id=DEVICEID&content=IMAGEDESCRIPTION&image=IMAGEBASE64

You'll need to translate the image to Base64.

Check for Updates

For getting the current clipboard content, just request:

http://quickclip.heinemann.at/api/updates.php?accesscode=ACCESSCODE&id=DEVICEID

The respond will be the following:

CONTENT|HTMLCLIPBOARD

Or if the clipboard contains an image:

img|IMAGEBASE64

Get User-Information

You may get some information about the user. E-Mail and other information keep private because of the users privacy.

Get Username

http://quickclip.heinemann.at/api/getuserinfo.php?accesscode=ACCESSCODE&type=name

Get the users description (if available)

http://quickclip.heinemann.at/api/getuserinfo.php?accesscode=ACCESSCODE&type=description

Get the users rank (0 = normal user, 1 = admin)

http://quickclip.heinemann.at/api/getuserinfo.php?accesscode=ACCESSCODE&type=rank