photosV2.getUploadUrl ✎ Edit on GitHub

The method starts photo upload workflow and returns an upload URL

NameRequiredTypeDescription
uid false String

ID of user who uploads photos. Parameter must be set when there is no session.

aid false String

Album ID. If not set photos will be added to the Personal album.

gid false String

Group ID. Set this and aid to upload into a group album or to create a topic in a group.

count false Integer

Number of photos to upload. Default: 1.

placeholders false Boolean

Returns an upload URL with placeholders rather than IDs. Allows uploading multiple images by small portions specifying IDs subset during the second stage. Default: false.

topicLink false Boolean
sizes false Long

Comma-separated images sizes list in bytes. Allowed list lengths: 0 (not set), 1 (size of the largest image), and count. Allows to avoid proceeding to the stage 2 when some sizes exceed the limit. (If the parameter is not set and any image is too big, stage 2 will fail anyway.)

Authorization

Session is optional (for External applications - required)

Required permissions:

  • PHOTO_CONTENT

See the full image upload example (in Russian)

Response

{ "expires_ms": "Long", "photo_ids": [ "String" ], "ttl_ms": "Long", "upload_url": "String" }

Application paramters

User session data

Method

List of paramters

Используем для подписи secret_key = session_secret_key
Используем для подписи secret_key = application_secret_key
Используем для подписи secret_key = MD5(access_token + application_secret_key)
secret_key =
Сортируем и склеиваем параметры запроса и secret_key
Рассчитываем MD5 от полученной строки и получаем параметр sig