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!
The respons will look like that:
Split them with the "|-Char"
For further actions you have to save these two variables (accesscode and deviceID).
You need upload requests to upload your clipboard to the server.
It's almost the simpliest part:
Or if you want to upload an image:
You'll need to translate the image to Base64.
Check for Updates
For getting the current clipboard content, just request:
The respond will be the following:
Or if the clipboard contains an image:
You may get some information about the user. E-Mail and other information keep private because of the users privacy.
Get the users description (if available)
Get the users rank (0 = normal user, 1 = admin)