C
C
CosmeticsBY2016-02-19 15:03:46
In contact with
CosmeticsBY, 2016-02-19 15:03:46

And again photos.getMarketUploadServer. method from VK API. error: photos_list is invalid. Why?

I follow the instructions https://vk.com/dev/upload_files?f=Upload%2Bphotog... I want to add a product image.

STEP 2. The application generates a POST request to the received address.
The request must contain the file field, which contains the image file (JPG, PNG, or GIF).

so I do it, only in the example they have such an answer
{"server":625831,"photo":"[{\"photo\":\"8d81799f90:w\",\"sizes\":}]", "hash":"8954a4da5ba06d4e","crop_data":"oAAmMpwAAAAAlTWyjA","crop_hash":"729155760247b391134"}

with the proviso that the photo parameter may change and it may contain nested JSON
. I have photo as a string

string (230) "{" server ": 999," photo ":" eyJwaG90byI6IjAiLCJid2FjdCI6Im1hcmtldF9hbGJ1bSIsInNlcnZlciI6NjI3NjI4LCJtaWQiOjM1MDI1ODI1OSwiX3NpZyI6IjI2NGU2MTlhZmU4ZmJhNjQ0OTc0Y2MwZTJkNzgxMTdlIn0 "," gid ": 114903161," hash ":" blablalba "}"

After that, passing the parameters to the photos.saveMarketPhoto method, I get the following error
array(1) {
["error"]=>
array(3) {
["error_code"]=>
int(100)
["error_msg"]=>
string(78) "One of the parameters specified was missing or invalid: photos_list is invalid"
.......

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CosmeticsBY, 2016-02-19
@CosmeticsBY

My mistake was that I called the wrong photos.getMarketAlbumUploadServer method on photos.getMarketUploadServer.
But there was another problem, I don’t get the crop_data and crop_hash parameters after sending the post parameters

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question