Answer the question
In order to leave comments, you need to log in
How to get access_token vkontakte oauth2?
Application in the form of a website.
I do authorization as per the guide I
stop to receive a token writes:
{"error":"invalid_grant","error_description":"Code is invalid or expired."}
https://oauth.vk.com/access_token?client_id=мойид&client_secret=мойключ&redirect_uri=мойурл&code=257db363d39654cac7
Answer the question
In order to leave comments, you need to log in
That's how my problem was solved.
In general, the situation is this, you need to go to http to get the code, not https.
Why don't you use Auth Widget ?
// EDIT
If there are problems in the server part:
1) check the settings of the VK application (callback url, etc.)
2) check the links that you generate
It looks like a new code has already been received,
so the request contains the old one, which is what it swears at.
You need to try to get the code again using the link
https://oauth.vk.com/authorize?client_id=1&display...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question