Answer the question
In order to leave comments, you need to log in
Simple check for user existence (VK API)?
Hello.
What is the easiest way to check on the backend whether the correct data is coming from the application (IFRAME)?
More specifically, does the access_token match the user(viewer_id). And then the app gives me discounts - I don’t want the uid substitution to give a new discount.
Google search shows a bunch of options with authorization, but this is not quite right.
Answer the question
In order to leave comments, you need to log in
Calculate and compare auth_key vk.com/developers.php?id=-1_27971896&s=1
uid is the id of the current user?
if yes, then you can make the first request to the API when loading (there is such a setting right in the contact) for example like this:
method=getProfiles&uids={viewer_id}&format=json&v=2.0&fields=photo
then when loading you already have in get['viewer_id '] real ID.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question