POST (Header:PUT) api.ashx/v2/users/{userid}/avatar.{json|xml}
UPDATE a users avatar.
Scopes
Users › Modify Avatars users.avatars.modify
Request Parameters
Name | Type | Location | Description | Required | Default | Options |
---|---|---|---|---|---|---|
AvatarUrl | string | URL to the avatar image. | Optional | |||
FileData | Byte[] | Data for the avatar image. OBSOLETE in 12: Use FileUploadContext instead. | Optional | |||
FileName | string | Filename of temporary file for the avatar image. | Optional | |||
FileUploadContext | string | UploadContext of temporary file for the avatar image. | Optional | |||
UserId | int | User ID. | Required |
Example Requests
Widget Javascript
jQuery.telligent.evolution.put({ url: jQuery.telligent.evolution.site.getBaseUrl() + 'api.ashx/v2/users/{userid}/avatar.json', data: { 'userid': '6' } }).then(function(response) { // use response });
Example Responses
JSON
{ "AvatarUrl": "avatarurl", "Info": [ "string", "string" ], "Warnings": [ "string", "string" ], "Errors": [ "string", "string" ] }
XML
<?xml version="1.0" encoding="utf-16"?> <Response> <Info> <Message>string</Message> <Message>string</Message> </Info> <Warnings> <Message>string</Message> <Message>string</Message> </Warnings> <Errors> <Message>string</Message> <Message>string</Message> </Errors> <AvatarUrl>avatarurl</AvatarUrl> </Response>