Подскажите, получаю токен GET-запросом:
https://oauth.vk.com/token?grant_type=password&client_id=2274003&client_secret=hHbZxrka2uZ6jB1inYsH&username={-Variable.username-}&password={-Variable.password-}
потом, подставляю его в POST-запрос:
https://api.vk.com/method/execute?access_token={-Variable.access_token-}&code=var+group+%3D+%5B%5D%3B%0D%0A%0D%0Avar+offset+%3D+0%3B%0D%0A%0D%0Awhile+%28offset+%3C+25000%29%7B%0D%0A%0D%0Avar+users+%3D+API.groups.getMembers%28%7B%22group_id%22%3A82962125%2C%22offset%22%3Aoffset%7D%29%3B%0D%0A%0D%0Agroup+%3D+group+%2B+%5Busers%5D%3B%0D%0A%0D%0Aoffset+%3D+offset+%2B+5000%3B%0D%0A%0D%0A%7D%3B%0D%0A%0D%0Areturn+group%3B
Получаю ответ:
HTTP/1.1 200 OK
Server: Apache
Date: Mon, 25 Apr 2016 19:56:02 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 376
Connection: keep-alive
X-Powered-By: PHP/3.23238
Set-Cookie: remixlang=3; expires=Tue, 25 Apr 2017 09:12:08 GMT; path=/; domain=.vk.com
Pragma: no-cache
Cache-control: no-store
Content-Encoding: gzip
{"error":{"error_code":5,"error_msg":"User authorization failed: no access_token passed.","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"execute"},{"key":"https:\/\/api.vk.com\/method\/execute?access_token","value":"c3f78473f526bc38808b15addcfee2d5ae8fe3cafa339a398eb62d18754cef62ff41445f16758a86f33f8"},{"key":"code","value":"var group = [];\r\n\r\nvar offset = 0;\r\n\r\nwhile (offset < 25000){\r\n\r\nvar users = API.groups.getMembers({\"group_id\":82962125,\"offset\":offset});\r\n\r\ngroup = group + [users];\r\n\r\noffset = offset + 5000;\r\n\r\n};\r\n\r\nreturn group;"}]}}
Я так понимаю - это ошибка авторизации, почему только что полученый токен не прокатывает?