P
P
prohodil_mimo2018-03-26 23:30:26
Classmates
prohodil_mimo, 2018-03-26 23:30:26

Odnoklassniki API. Uploading a photo for a media topic, errors 100 and 104!?

Good evening!
I'm trying to send a media topic with one photo and text to a group. Due to circumstances, I don’t use the SDK, I just work with API methods.
At first I get a server for uploading, upload_url and photo ID come.
I send a photo to this address, everything is in order, the same photo ID and token come in the answer.
I'm trying to send this photo ID to a media topic and after a time I get one of two errors - either
100 Parameter 'PHOTO id' is invalid
or
104 PARAM_SIGNATURE : Invalid signature D547372D35E69D85A3DF6381C906DA3B, calculated by string application_key=CBAK8888888888BAattachment={"media": [{"type": "photo","list": [{"id": "4rrWEILe7OF1wmVgpSNRZHDEGK XU21ZrHDEGK XU21ZrHDEGK XU21Zr/WfW5w6} ]},{"type": "text","text": "Hi!!!!!"}]}format=jsongid=55*********method=mediatopic.posttype=GROUP_THEME** ******SECRET KEY*******

Without a photo with only one text, everything works fine.
I don’t do anything with the ID, i.e. it is native, coming from the server. Why doesn't it work?
I tried to insert the incoming token instead of the ID - the same thing.
I tried to send the same request through the method description page in the documentation - the same result, only the error is always 100.
Tell me, please, what could be the problem? I googled the same error, but there the error was in the SDK IOS, I did not find any other information.
Just in case, here is the text of the request, which is sent from the documentation page and also gives an error:

spoiler
https://api.ok.ru/fb.do
?application_key=CBAK********BA
&attachment=%7B%20%22media%22%20%3A%20%5B%7B%22type%22%3A%20%22photo%22%2C%22list%22%3A%20%5B%7B%22id%22%3A%20%22irzC9oqjMBv7WGDKGGR4ppXsrrwMf1xMlkm7EUc5gcix9hEw7v7%2FsA%3D%3D%22%7D%5D%7D%2C%7B%20%20%20%20%20%20%22type%22%3A%20%22text%22%2C%20%20%20%20%20%20%22text%22%3A%20%22Text1%22%7D%5D%20%20%20%20%7D
&format=json
&gid=555*******
&method=mediatopic.post
&type=GROUP_THEME
&sig=b10861838bd7f3506ece61befe616499
&access_token=*******

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
prohodil_mimo, 2018-03-26
@prohodil_mimo

He asked himself - he answered. In general, after applying urlencode, everything worked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question