Home
Retrieving a profile photo
To retrieve the image file that supplies a person's photo to a profile, use the image link returned in the entry document.
You can retrieve profile photos for any person in your organization. You will still have to authenticate when you make the request if the server is set up to force all traffic to use SSL. See Authenticating requests for information about how to authenticate the request. To retrieve an image file from a profile...
- Get the service document for the person's profile. See Retrieving the Profiles service document.
- Get the URI of the profiles feed which is specified in the href attribute of the collection element in the service document and use it to get the profiles feed for the person.
- Find the <link rel="http://www.ibm.com/xmlns/prod/sn/image" .../> element returned in the feed. For example:
<link href="https://profiles.enterprise.acme.com/profiles/photo.do?key= b559403a-9r32-2c81-c99w-ppq8bb69442j&lastMod=1204662695516" rel="http://www.ibm.com/xmlns/prod/sn/image" type="image" />
- Send a GET request to the Web address specified in the href attribute.
Atom API request details
Method Resource URI Output representation GET Image file Value of the href attribute of the <link rel="http://www.ibm.com/xmlns/prod/sn/image" .../> element in the user's profiles feed. "image/jpeg", "image/pjpeg", or "image/gif"
Input
None.
Output
A binary image file Returned HTTP Headers
- HTTP/1.1 200 OK
- Indicates that the request succeeded.
- Content-Type
- Indicates format of the response to a GET request.
- Content-Length
- Indicates the length of the response to a GET request.
Related reference