Answer the question
In order to leave comments, you need to log in
How to get the user's access_token to work with it from the server?
I can't figure out how to get the user's access_token for the server!
I created applications in VK and when loading I get data:
http://мой сайт ру/social_api/index.html?api_url=http://api.vk.com/api.php&api_id=4656995&api_settings=9255&viewer_id=18601455&viewer_type=2&sid=39d0333ffdc54596841e8a0141ec04cf6bddfkdcc9dace6b5f646f112d96049ab45e087f08cdecbecf0efd&secret=b443998c65&access_token=32cc547e6e8f0ed1225e0beda38f63705a300fad9fe8541e7b8d25ea955b1497168c53b83737e703dbc2be2&user_id=18601455&group_id=0&is_app_user=1&auth_key=deac02f02ea4d9e25k56f5d3ae1394420&language=0&parent_language=0&ad_info=ElsdCQBUR1VlAQFeAkwJSXHt5BkQ8HTJXUVBBJRVBNwoIFjI2HA8E&is_secure=0&ads_app_id=4656995_d1kff23be7203289290&referrer=user_apps&lc_name=19950c48&hash=
api.vk.com/method/friends.get?uid=18601455&access_token=32cc547e6e8f0ed1225e0beda38f63705a300fad9fe8541e7b8d25ea955b1497168c53b83737e703dbc2be2
Answer the question
In order to leave comments, you need to log in
In the scope, ask for "offline" permission, then the token will be "eternal" and is not bound to IP.
Messages and wall.post methods are only accessible from a redirect to blank.html, i.e. receiving through the standard oAuth flow (giving the code to the server, and receiving the token from the server by the code) you will not receive them.
"access_token of the user for the server" - there is no such thing. There is a token for the client, and it must remain with the client. There is a token for the server, but not all methods are available for it.
Here's how to get a server token.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question