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. 

  • "application/json"
  • "application/xml"

If no parameter is set, JSON is the default response given.

"application/xml"
Content-Type

The format of the provided content.

  • "image/png"
  • "image/jpeg"
"image/jpeg"

 

HTTP Response

Success

HTTP response 200 with User summary Object 

(Example below)

 

Error

See API Error messages 

 

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"

    }

}

 

 

Comments


0 Comments

Last Updated: Nov 08,2024