Documentation

API /user/{userId}/photo/update

ThoughtFarmer REST API Method: /user/{userId}/photo/update

Update the user's photo with a new image.
 
URL:
http://yourserver.com/api/user/{userId}/photo/update

http://yourserver.com/api/2.0/user/{userId}/photo/update


Response Formats:
xml,json

HTTP Method(s):
POST
 
Requires Authentication:
true, user making call must pass a valid token parameter

Parameters:

Parameter Type Description
userId int Required. The user id of the user to update the photo of
data string Required. The Base64 encoded image
fileName string(255) Required. The file name of the image
contentType string(50) Required. The content type of the image eg. image/png
token string  Required. A valid token authentication parameter
Response Status Codes:
200 - Success
401 - Token parameter is invalid
403 - Not allowed to update
404 - User not found
500 - Parameter validation error

Example request
POST http://yourserver.com/api/user/{userId}/photo/update
POST Data userId={userId}&data={data}&fileName={fileName}&contentType={contentType}&token={token}
true