| Client → | ← Server |
|---|---|
| HTTP request | Data (JSON) |
| Sample API Request | Sample API Response |
| http://userapi.com/data?act=get_school_num&s=1 | {"num": 225005} |
| http://userapi.com/data?act=schools&parent=1516340 | {"n": 4, "d": [[374587, "Conservatorio Egidio Romualdo Duni", 100], [2151441, "GLK", 0], [2089411, "Liceo Classico E. Duni", 0], [2151440, "Rossa vita", 0]]} |
| Sample API Request | Sample API Response |
|---|---|
| http://userapi.com/data?act=photos&from=0&to=2&id=1&sid=c9858c2feaa17203fa87e6b8c2371380 | [["1_115456905", "http://cs93.userapi.com/u00001/25797999/m_f9af6bf6.jpg", "http://cs93.userapi.com/u00001/25797999/x_be594ecc.jpg"], ["1_90710441", "http://cs37.userapi.com/u00001/5433484/m_5ac5c794.jpg", "http://cs37.userapi.com/u00001/5433484/x_2e4eddbb.jpg"]] |
| Client → | ← Server | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||
| Sample API Request | Sample API Response | ||||||||||
| http://login.userapi.com/auth?login=force&site=2&email=test@test.com&pass=7777777 |
|
||||||||||
| Client → | ← Server | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||
| Sample API Request | Sample API Response | ||||||||
| http://login.userapi.com/auth?login=auto&site=2 |
|
||||||||
| Client → | ← Server | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||
| Sample API Request | Sample API Response | ||||||||
| http://login.userapi.com/auth?login=confirm&site=2&cid=546ca8664640fef3d8b0a0a2978c3fbd |
|
||||||||
| Client → | ← Server | ||||||||
|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||
| Sample API Request | Sample API Response | ||||||||
| http://login.userapi.com/auth?login=logout&site=2&sid=c9858c2feaa17203fa87e6b8c2371380 |
|
||||||||
| Sample API Request→ | ← Response |
|---|---|
| http://userapi.com/data?act=friends&from=10&to=12&id=1&sid=9986006b784ebbc4c472db7319a51e93&back=processFriends | processFriends([[42, "Sergey Markin", "http://cs113.userapi.com/u00042/b_94ae6676.jpg", 0], [45, "Sergey Vinogradov", "http://cs16.userapi.com/u00045/b_f9c7d9e.jpg", 0]]); |
| Require the part of friend list for user 1, from the 10th to the 12th friend (exclusive), with the resulting array passed to a certain processFriends() function. | Function processFriends() is to be invoked with the array of friends 10 and 11 of user 1 as an argument. |
| Value of 'act' | Result |
|---|---|
| friends | List of all friends of a user |
| friends_mutual | List of mutual friends with a user |
| friends_online | List of online friends of a user |
| friends_new | List of new friend requests to the current user |
| Client → | ← Server | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=photos&from=0&to=2&id=1&sid=c6c1d30d34459e592ca0455f69b2c8a3 | [["1_115456905", "http://cs93.userapi.com/u00001/25797999/m_f9af6bf6.jpg", "http://cs93.userapi.com/u00001/25797999/x_be594ecc.jpg"], ["1_90710441", "http://cs37.userapi.com/u00001/5433484/m_5ac5c794.jpg", "http://cs37.userapi.com/u00001/5433484/x_2e4eddbb.jpg"]] | ||||||||||||||||||||||||||||||||
| Value of 'act' | Result |
|---|---|
| photos | List of all photos uploaded by a user |
| photos_with | List of all photos with a user |
| photos_new | List of new (unapproved) photos, on which current user has been tagged |
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=wall&from=0&to=2&id=1&ts=670000055&sid=c6c1d30d34459e592ca0455f69b2c8a3 | {"n": 22459, "d": [[48776839, 1224745160, ["<a href='http://195.218.181.1/assets/videos/bc71198266671054.vk.flv'><img src='http://195.218.181.1/assets/thumbnails/bc71198266671054.160.vk.jpg'/></a>", 3, "George Carlin - Religion is bullshit", "http://195.218.181.1/assets/thumbnails/bc71198266671054.160.vk.jpg", "http://195.218.181.1/assets/videos/bc71198266671054.vk.flv", "16494692", "70493039"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [1]], [48771962, 1224715800, ["Thank you for all you do!"], [9958040, "Alena Kravtsova", "http://cs293.userapi.com/u9958040/b_1de41aae.jpg", "c_bb652722", 1, 0], [1]]], "h": [[670000057, "add", [48777477, 1224746560, ["test"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [1]]], [670000059, "del", [48777477]], [670000061, "undel", [48777477, 1224746560, ["test"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [1]]]} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=photos_comments&from=0&to=2&parent=1_79435064&id=1&sid=c6c1d30d34459e592ca0455f69b2c8a3 | {"parent": "1_79435064", "h": 983000002, "d": [["85935454", "1219069674", ["yes, thaaat's me - near the very top ;)"], [12, "Yuly Dzhumasultanov", "http://cs201.userapi.com/u00012/b_5a7b82f4.jpg", "c_7e80ab05", 2, 0], [1], 0, 0, [79435064]], [81711268, 1208200679, ["Beautiful..."], [3226038, "Masha Petrova", "http://cs309.userapi.com/u3226038/b_02f896e7.jpg", "c_a8170db8", 1, 0], [1], 0, 0, [79435064]]], "n": 2, "tags": [{"tid": 3611353, "placer_id": 1, "id": "12", "name": "Yuly Dzhumasultanov", "x1": 38.99, "y1": 23.67, "x2": 62, "y2": 52.88}], "author": [1, "Pavel Durov"]} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=activity&from=1&to=2&id=6704204&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 42, "d": [["6704204_140129285", 6704204, 1, "Sidney Bristow", 1224735103, "Kamakazi, nazi, nazi, copy papi I'm a baller baller, you're not at all Oops, oopsy daisy, oh I'm crazed..."], ["6704204_139859457", 6704204, 1, "Sidney Bristow", 1224529016, "to the beach yo."]], "h": 299000002} | ||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||
| http://userapi.com/data?act=fave&from=6&to=8&id=1&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 154, "d": [["32951", "Viktoria Turgunova", "http://cs407.userapi.com/u32951/b_8109fa23.jpg", 0], ["740975", "Anna Kameneva", "http://cs17.userapi.com/u740975/b_7eef1de.jpg", 0]]} | ||||||||||||||||||
| Value of 'act' | Result |
|---|---|
| fave | List of all users bookmarked by current user |
| fave_online | List of online bookmarked users |
| faved | List of users who bookmarked current user |
| Client → | ← Server | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||
| http://userapi.com/data?act=updates_activity&from=0&to=2&id=0&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 484, "d": [["31225_140195756", 31225, 1224757408, "Lyolya Fomina", 1224757173, "chocolates, chocolates...))))))))."], ["201541_140123249", 201541, 1224757307, "Sveta Pusechkina", 1224756891, "These intriguing and enthralling stares....this barrier, obstacle.....this voice.....this girl....why everything is so complicated?"]]} | ||||||||||||||||
| Client → | ← Server | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||
| http://userapi.com/data?act=updates_friends&from=0&to=2&id=0&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 1034, "d": [["3643009", "Nadezhda Troitskaya", "http://cs206.userapi.com/u3643009/b_0fbda514.jpg", 0], ["20175184", "Alexey Seryapin", "http://cs272.userapi.com/u20175184/b_6626ecfb.jpg", 0]]} | ||||||||||||||||
| Client → | ← Server | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||
| http://userapi.com/data?act=updates_photos&from=0&to=2&id=0&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 956, "d": [["7275620_117953590", "http://cs440.userapi.com/u7275620/19135819/m_cb29d6c4.jpg", "http://cs440.userapi.com/u7275620/19135819/x_54a5f2b5.jpg"], ["7275620_117953589", "http://cs440.userapi.com/u7275620/19135819/m_56784e9e.jpg", "http://cs440.userapi.com/u7275620/19135819/x_3f973a90.jpg"]]} | ||||||||||||||||
| Value of 'act' | Result |
|---|---|
| updates_photos | List of photos uploaded by current user's friends recently (at most 3 days ago) |
| updates_tagged_photos | List of photos with recently tagged user's friends |
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=message&from=0&to=2&id=10&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 151, "d": [[121444273, 1224759330, ["Well is he a genius?"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [10], 0], [106065105, 1224583486, ["An old acquaintance of mine thinks about changing his job, and asks whether we need developers. Do we?"], [10, "Alexandr Kuznetsov", "http://cs146.userapi.com/u00010/b_34230f2c.jpg", "c_8109903f", 2, 0], [1], 1]], "h": 433000024} | ||||||||||||||||||||||||||||||||||||||
| Value of 'act' | Result |
|---|---|
| message | Correspondence between given user and current user |
| inbox | All incoming messages of current user |
| outbox | All outgoing messages of current user |
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=cities&from=0&to=2&parent=9&id=1&q=bosto | {"n": 63, "d": [[[1515864, "Boston", 1, 0, 1], [5035939, "Suffolk County", 22], [5135820, "Massachusetts", 21], [9]], [[4978585, "Boston", 1, 0, 1], [4979613, "Highland County", 22], [5066570, "Ohio", 21], [9]]]} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||
| Sample API request | Sample API Response | ||||||||||||||||||||||
| http://userapi.com/data?act=schools&parent=1933819 | {"n": 1, "d": [[2101401, "st. Antonio # 34.5", 0]]} | ||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||
| http://userapi.com/data?act=search_results&from=0&to=2&parent=2289&sid=0a200f062ebba1b9ca32e24ba9685638 | {"belongs": -1, "n": 2937, "d": [[43433, "Sergey Leonov", "http://cs100.userapi.com/u43433/b_8b09b08a.jpg", 0], [45307, "Maria Soshnikova", "http://cs228.userapi.com/u45307/b_2415eec0.jpg", 0]]} | ||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||
| http://userapi.com/data?act=quick_search&from=0&to=2&q=durov&sid=622ccd76a5b4b67fbc753abd53e41ad2 | {"n": 1189, "d": [[1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", 1], [6, "Nikolay Durov", "http://cs1024.userapi.com/u00006/b_37a43719.jpg", 1]]} | ||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?friends=0-2&photos=0-2&wall=0-2&id=1&sid=0a200f062ebba1b9ca32e24ba9685638 | {"wall": {"n": 22452, "d": [[48469764, 1224323455, ["Pavel,the site is really super!!!!"], [273611, "Svetlana Fedorova", "http://cs166.userapi.com/u273611/b_7ba3263a.jpg", "c_85f62239", 1, 0], [1]], [48350915, 1224155096, ["Cool site ;) Thanks :)"], [6875276, "Irina Kalyuzhina", "http://cs1432.userapi.com/u6875276/b_0c8cdb78.jpg", "c_388c71b4", 1, 0], [1]]]}, "photos": {"n": 34, "d": [["1_115456905", "http://cs93.userapi.com/u00001/25797999/m_f9af6bf6.jpg", "http://cs93.userapi.com/u00001/25797999/x_be594ecc.jpg"], ["1_90710441", "http://cs37.userapi.com/u00001/5433484/m_5ac5c794.jpg", "http://cs37.userapi.com/u00001/5433484/x_2e4eddbb.jpg"]]}, "friends": {"n": 349, "d": [[3, "Vyacheslav ", "http://cs47.userapi.com/u00003/b_4fd0a4bc.jpg", 0], [7, "Alexey Kobylyansky", "http://cs26.userapi.com/u00007/b_5b634f4.jpg", 0]]}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
act=history the UserAPI enables the Client to obtain recent
updates history for one or several objects, which may be used to display changes almost
immediately after they happen, without having to refresh all data.
Besides that, act=history enables the Client to obtain values of several counters
(such as the new friend applications counter), which can be also displayed and taken into account immediately.
Furthermore, the same act=history request may be also used to tell the Server that
various data will soon be needed, so as to enable the Server to prepare these data beforehand.
| Client → | ← Сервер | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||
| Sample API Request | Sample API Response | ||||||||||||
| http://userapi.com/data?act=history&sid=0b95f864b67a0b16d9d0fc20748b8e2d | {"nm": 0, "nf": 271929, "nph": 2} | ||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=history&wall=992000002&id=1&sid=0b95f864b67a0b16d9d0fc20748b8e2d | {"wall": {"h": [[992000003, "add", [48872711, 1224866627, ["test"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [1]]]]}, "nf": 271930, "nm": 0} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=history&friends_new=2&us=-1&sid=55b15011458c72fa559b7431be8fec47 | {"friends_new": {"n": 272396, "d": [[19224971, "Roman Boguslavsky", "http://cs266.userapi.com/u19224971/b_9fe20cc1.jpg"], [11116614, "Dmitry Shabala", "http://cs1209.userapi.com/u11116614/b_1b620100.jpg"]]}, "nf": 272396, "nm": 0, "us": 1} | ||||||||||||||||||||||||||||||||||||
captcha_sid - any random integer or real number of at least 8 decimal digits| Sample API Request | Sample API Response |
|---|---|
| http://userapi.com/data?act=add_wall&id=1&ts=647000005&message=tst&fcsid=0.615638748369059&fccode=9mn3h&sid=55b15011458c72fa559b7431be8fec47 | {"ok": 1, "h": [[647000007, "add", [48897703, 1224891706, ["tst"], [1, "Pavel Durov", "http://cs137.userapi.com/u00001/b_6261d317.jpg", "c_015fd76c", 2, 1], [1]]]]} |
session id expires or any other authorisation failure occurs, UserAPI will return the following array instead of expected result:
| Error code | Explanation |
|---|---|
| Redirect to {site url}#index.html;sid=-1 | Incorrect email or password |
| Redirect to {site url}#index.html;sid=-2 | Incorrect CAPTCHA code while submitting email and password |
| Redirect to {site url}#index.html;sid=-3 | Incorrect email or password, next login attempt must be submitted with a CAPTCHA code. |
| Redirect to {site url}#index.html;sid=-4 | Incorrect email or password, CAPTCHA is not required |
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=register&s=397539&year=2013&fn=Iwan&ln=Smirnow&email=iwan-sm100@mail.ru&pass=777777777&sex=2&site=2&ccode=k86gz&csid=0.24627315661712001 | 1 | ||||||||||||||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||||
| http://userapi.com/data?act=edit_page&sx=2&fs=1&pv=3&bd=10&bm=10&by=1984&mo=7777777&cii=2&sid=95468d56b3a2dedd8fa9b6e03fc6c2d0 | {"ok": 1} | ||||||||||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||||||||
| http://userapi.com/data?act=add_friend&id=18369759&sid=95468d56b3a2dedd8fa9b6e03fc6c2d0 | {"ok": 3} | ||||||||||||||||||||||||||||||
| Client → | ← Server | |||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||||||||||||||
| Sample API Request | Sample API Response | |||||||||||||||||||||||
| http://userapi.com/data?act=del_fave&id=543870&sid=95468d56b3a2dedd8fa9b6e03fc6c2d0 | {"ok": 0, "id": 543870} | |||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||||||||||
| Sample API Request | Sample API Response | ||||||||||||||||||||||||
| http://userapi.com/data?act=add_school&school=3378&year=2004&sid=db9e1d4282d77ffffea070797ba0cea7 | {"ok": 1} | ||||||||||||||||||||||||
| Client → | ← Server | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Sample API Request |
Sample API Response |
http://userapi.com/data?act=put_tag&id=1&x1=31&y1=5.932203389830509&x2=81&y2=34.18079096045198&parent=1_3637189&name=Pavel Durov&sid=db9e1d4282d77ffffea070797ba0cea7
|
[{"tid": "3824227", "placer_id": "1", "id": "0", "name": "yabloko", "x1": 67, "y1": 23.45, "x2": 95, "y2": 38.7}, {"tid": "5022359", "placer_id": "1", "id": "1", "name": "Pavel Durov", "x1": 31, "y1": 5.93, "x2": 81, "y2": 34.18}]
|
Posting new messages and comments
Removing messages and comments
Undeleting messages and comments
Editing photos
Uploading new photos requires knowledge of hashes obtained while
loading user's profile.
Uploading photos
Important: the POST HTTP request with photo image file is submitted not to http://userapi.com/data, but to the following URL:
{value of ["pr"]["url"]}+upload.php
For example, if the value of ["pr"]["url"], obtained in a profile request, equals 'http://cs190.userapi.com/', then the URL for posting photos will be:
http://cs190.userapi.com/upload.php
Removing photos
Editing current status
Final remarks
All registered project leaders will be informed about new UserAPI capabilities by e-mail.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||