User APIs
Add User profile image
OVERVIEW
Overview
Add a profile image for a user in Publisher
This API call is used to add a new profile image
Since v4.6
HTTP Request
POST /api/2/users/<ID>/profileimage
OR
POST /api/2/users/<EMAIL>/profileimage
HTTP Request Object
A binary file, or base64 data image file.
HTTP Headers
| HTTP Request Header | Description | Example |
|---|---|---|
| Authorization | The API Authorisation token. | "Bearer XXXXXXXXXXXXX" |
| Accept |
The format of the expected response.
If no parameter is set, JSON is the default response given. |
"application/xml" |
| Content-Type |
The format of the provided content.
|
"image/jpeg" |
HTTP Response
Success
HTTP response 200 with User summary Object
(Example below)
Error
Example HTTP Request & Response
POST http://example.com/context/api/2/users/3/profileimage
JSON Request
file: profile-image.jpeg
JSON Response
{
"user": {
"id": 3,
"email": "user@domain.com",
"link": "http://example.com/context/api/2/users/3"
}
}
Last Updated: Nov 08,2024
Comments
0 Comments