This method uploads the current user's profile photo to Gigya's server.
By default the uploaded photo is treated as a temporary photo. You can decide whether to publish the photo into the user's account, using the publish parameter (see below), or you can publish later using the accounts.publishProfilePhoto API method.
Note: This method is also supported in our REST API. If you wish to execute this method from your server, please refer toREST API > accounts.setProfilePhoto
The following table lists the available parameters:
|||photoBytes||string||A BASE64 encoded string representation of the photo bytes. The size limit of the photo is 6MB, and the supported image types are png, jpeg, and gif.|
|||publish||Boolean||Indicates whether to publish this photo to the user's profile or treat it as a temporary photo. The default value is 'false', i.e. the photo is temporary. You can later publish a temporary photo using the accounts.publishProfilePhoto API method. If published, the photo is saved in the photoURL field of the user's Profile, in addition the photo is trimmed to the size defined in the site's Policies (64X64 by default) and saved in the thumbnailURL field.|
|||callback||function||A reference to a callback function. Gigya calls the specified function along with the results of the API method when the API method completes.|
The callback function should be defined with the following signature: functionName(response).