Profile Pictures
As you would expect on a social platform, each user in Interact has their own profile. Part of which is the inclusion of a profile picture. Profile pictures can easily be uploaded programmatically reducing the manual overhead of someone uploading thousands of pictures, or for your employees to upload their own.
Interact recommends profile pictures are square and are sized at 600x600 pixels to get the best quality and use out of profile pictures.
In order to upload a profile picture, you must first create a profile source as described in "Step 1" of the General Profile Sources guide. Once this is created, then uploading a picture is simply a case of uploading the image as the body of a multipart POST request.
There are multiple options for this described below.
1 - Where the internal personId within Interact is known, this can be passed in the URL as shown below. Simply replace '{personId}' with the person's username.
https://yourintranet.intertactgo.com/api/umi/{domainId}/upload/{personId}/picture
2 - Where the username of the profile within Interact is known, this can be passed in the URL as shown below. Simply replace '{username}' with the persons username.
https://yourintranet.intertactgo.com/api/umi/{domainId}/upload/username/{username}/picture
3 - Where the UMI id of the profile within Interact is known, this can be passed in the URL as shown below.Simply replace '{umiid}' with the persons UMI Id. The UMI Id is typically the identifier of the person in the source user system and is included in the 'id' attribute for a user when uploading the XML file for the General Profile Source.
https://yourintranet.intertactgo.com/api/umi/{domainId}/upload/umiid/{umiid}/picture
In all cases, the domainId
parameter refers to the ID of the profile source. This ID is displayed on the "Manage Profile Sources" page after saving the profile source. For example:
Refer to the sample PowerShell script for more on this.
For performance reasons, images uploaded through this API call are restricted in the following ways
- Images larger than 5MB are not permitted
- More than 6 requests per minute are not permitted
Requests with images that exceed the permitted size will return a 413 (Payload Too Large) status code
Requests with images that exceed the permitted requests per minute will return a 429 (Too Many Requests) status code
It should be noted that Interact will apply the uploaded picture to the profile without checking that the picture has changed, therefore this should only be used to upload pictures where the picture has changed.
Updated 10 months ago