To add an profile picture to an application you’ll need the ID of the application (applicationId) and an image file to upload. Learn here how to remove the profile picture again. There can be only one profile picture in an application. If you want to replace the profile picture by another you have to remove the old one first and then upload the new one. To get the profile picture follow these steps.

HTTP-Method

POST

Path

/api/rest/v3/frontend/attachments/photo

Authentification

User Access Token

Path Parameter

-none-

Query Parameter

applicationId

Responses

Action Response Description
success see example call
authorization error 401 / 403 See here and here for details.
already present 428 – { “code”: “precondition_failed_error”, “message”: “there is already a PHOTO for this application. you have to remove the old one first before uploading a new one.” } The application already contains a profile picture. That one has to be removed first.
error 404 – { “code”: “get_application_error” } No application was found for the provided ID.
error 400 – { “code”: “get_application_error”, “message”: “Cannot retrieve applications of others” } The application does not belong to the user issued in the token
error 400 – { “code”: “application_deleted_error”, “message”: “Cannot retrieve deleted application” } The application has been deleted
error 400 – { “code”: “application_access_error”, “message”: “Application is not editable anymore” } The application is not editable anymore.

Example call with curl and user access token

Response:

Comments

Comments are closed.