User Profiles Banner Photo

Get, create, or delete the banner photo for a user.

To use an image from the Files page as a user banner photo, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the User Profile page don’t have a file ID and can’t be used as the fileId.

To upload a binary file as the user banner photo, send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files.

Resource
/connect/user-profiles/userId/banner-photo
/connect/communities/communityId/user-profiles/userId/banner-photo
Available version
36.0
Requires Chatter
Yes
HTTP methods
GET, HEAD, POST, DELETE
Request body for POST
Root XML tag
<bannerPhoto>
JSON example
{   "cropHeight" : "120",
    "cropWidth" : "240",
    "fileId" : "069D00000001IOh"
}
Properties
Name Type Description Required or Optional Available Version
cropHeight Integer Height of the crop rectangle in pixels. Optional 36.0
cropWidth Integer Width of the crop rectangle in pixels. Optional 36.0
cropX Integer X position of the crop rectangle from the left edge of the image in pixels. Top left is position (0,0). Optional 36.0
cropY Integer Y position of the crop rectangle from the top edge of the image in pixels. Top left is position (0,0). Optional 36.0
fileId String 18 character ID of an existing file. The key prefix must be 069 and the file must be an image and be smaller than 2 GB.

Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used.

Note

Required to use an existing file 36.0
versionNumber Integer Version number of an existing file. If not provided, the latest version is used. Optional 36.0
Request parameters for POST
Name Type Description Required or Optional Available Version
cropHeight Integer The length of an edge in pixels of the crop rectangle. Optional 36.0
cropWidth Integer The width of an edge in pixels of the crop rectangle. Optional 36.0
cropX Integer The position X in pixels from the left edge of the image to start the crop square. Top left is position (0,0). Optional 36.0
cropY Integer The position Y in pixels from the top edge of the image to start the crop square. Top left is position (0,0). Optional 36.0
fileId String ID of an existing file. The key prefix must be 069 and the file size must be less than 8 MB.

Images uploaded on the Group page and on the User page don’t have file IDs and therefore can’t be used.

Note

Required to use an existing file 36.0
versionNumber Integer Version number of an existing file. If not provided, the latest version is used. Optional 36.0

Photos are processed asynchronously and may not be visible right away.

Note

Response body for GET and POST
Banner Photo
Response body for DELETE
204: Successful Delete