Do you know if it's possible at all, and if possible - what's the HTTP API or Java API to upload a new avatar?
Asked
Active
Viewed 696 times
2 Answers
0
You shouldn't need an API on GitHub side: as I mentioned here, all you need is for your GitHub account email to match the one used for your Gravatar.
That leaves you with a Gravatar API call, like an xmlrpc: see an example here.
It uses specifically:
grav.saveData - Save binary image data as a userimage for this account
@param (string)$args['data'] a base64_encode()d image
@param (int)$args['rating'] 0:g, 1:pg, 2:r, 3:x
@param (string)$args['password'] for authentication
@return (bool)false on failure, (string)userimage on success

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-1
Thanks, it answered my question
I am personally developing an Android application that uses GitHub SDK and wanted the device to take a picture to replace the avatar, I noticed gravatar API has a Java implentation, I might take that approach, I am a bit afraid because gravatar requires the user password as a raw string (text)

Zeev Melumian
- 49
- 2