Request
To enable the user to select an icon image (avatar) for their profile, the client application needs to get all the available profile icon images so it can display them to the user.
To get all the profile images, send a GET request to:
https://<host>:<port>/imagemetadata/v1/profileimage
Headers
-
Authorization– the client's access token, as a bearer token (Bearer <access token>). This is theaccess_tokenthat the client gets when it signs in – see Authentication token.
Mandatory arguments
None.
Other arguments
None.
Response
A successful request returns an HTTP 200 status.
A bad request returns an HTTP 400 status.
A forbidden request returns an HTTP 403 status – for example, if the access token is missing, invalid, or has expired.
Example
A successful request returns a payload that looks like this:
{
"count": 2,
"results": [
{
"resourceId": "smileyface",
"aspect": "1x1",
"uri": "image-service/discrete/OpfProfile/smileyface/default-locale/OpfProfile_1x1_master",
"imageId": "2971a79e-41eb-44b2-ae9a-4a8cc74e30f6"
},
{
"resourceId": "angryface",
"aspect": "1x1",
"uri": "image-service/discrete/OpfProfile/angryface/default-locale/OpfProfile_1x1_master",
"imageId": "43fcbfd9-118b-4980-b518-2b73daa0bad3"
}
]
}
See also
For full details of this API, see the Image Metadata Service (IMDS) API documentation.