I
I
Ilya2015-09-19 22:15:04
Classmates
Ilya, 2015-09-19 22:15:04

How are attachment and sig encrypted via mediatopic.post?

I'm making a request to add text to a group of classmates, but I can't understand how the attachment and sig parameters are formed.
Through the query calculator, everything works - the text is added.
The following is also written there:
1. Attention: the tab characters (% 09) and line breaks (% 0A, % 0D) have been replaced by \t, \n and \r, respectively, for clarity.
We get an alphabetically ordered UTF-8 parameter concatenation:
...
Note that the "access_token" parameter is not involved in the concatenation.
We add session_secret_key to the concatenation:
...
Calculate MD5 from the received string and reduce it to lower case - this is the signature (sig parameter):
...
I.e. like for example from this json:

{
"media": [
{
"type": "text",
"text": "Мой текст"
} 
]
}

Get attachment and sig parameters?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2015-09-21
@sergeyrk1

You can see an example of opening this widget on github
https://github.com/apiok/js_sample_widgets/blob/gh...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question