messages

messages.setChatPhoto

Sets a previously-uploaded picture as the cover picture of a chat.

To call this method, you can use:
• user access token obtained in the standalone app through Implicit Flow (access right required: messages — this is issued in exceptional cases by a request to support at devsupport@corp.vk.com)
• community access token (access rights required: messages)

Parameters

file

text

Upload URL from the response field returned by the method upon successfully uploading an image.

Required parameter

Result

Returns an object with the following fields:

  • message_id ­– ID of the system message sent.
  • chat – a chat object.

Error codes

22
Upload error
925
You are not admin of this chat
945
Chat was disabled
1017
Chat was deleted
1160
Original photo was changed

Common errors may occur during execution