Profile photos

Use these methods to manage client profile photos in the B2Core UI.

GET[host]/api/v2/my/photo

Get a client profile photo

POST[host]/api/v2/my/photo

Upload a client profile photo

DELETE[host]/api/v2/my/photo

Delete a client profile photo

Get a client profile photo

Use this method to get a profile photo uploaded for the currently authenticated client.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters

size

The image size in which you want to return a profile photo, in kilobytes (KB). The default value is 200.

GET[host]/api/v2/my/photo

curl --location --request GET 'https://host.name/api/v2/my/photo?size=200' \
--header 'Authorization: Bearer <token>'

Response

A response includes a binary image that corresponds to the query parameters specified in the request.

Upload a client profile photo

Use this method to upload a photo to a client profile. Supported image formats are GIF, JPEG and PNG.

Request

Header parameters:

  • Authorization: Bearer <access_token>

POST[host]/api/v2/my/photo

curl --location --request POST 'https://host.name/api/v2/my/photo' \
--header 'Authorization: Bearer <token>' \
--form 'photo=@"/path/to/file"'

Response

In case of success, no response body is returned.

Delete a client profile photo

Use this method to delete a photo from a client profile.

Request

Header parameters:

  • Authorization: Bearer <access_token>

DELETE[host]/api/v2/my/photo

curl --location --request DELETE 'https://host.name/api/v2/my/photo' \
--header 'Authorization: Bearer <token>'

Response

In case of success, no response body is returned.