To Log in with Virtualbook on your site
Log in With system is a fast and convenient way for people to create accounts and log into your app. Our Log in With system enables two scenarios, authentication and asking for permissions to access people's data. You can use Login With system simply for authentication or for both authentication and data access.

Starting the OAuth login process, You need to use a link for your app like this:
<a href="https://virtuala.site/api/oauth?app_id=63989374768180">Log in With Virtualbook</a>

The user will be redirect to Log in With page like this:

Once the user accpeted your app, the user will be redirected to your App Redirect URL with auth_key like this:
https://mydomain.com/my_redirect_url.php?auth_key=AUTH_KEY

This auth_key valid only for one time usage, so once you used it you will not be able to use it again and generate new code you will need to redirect the user to the log in with link again.

Access Token
Once you get the user approval of your app Log in With window and returned with the auth_key which means that now you are ready to retrive data from our APIs and to start this process you will need to authorize your app and get the access_token and you can follow our steps to learn how to get it.

To get an access token, make an HTTP GET request to the following endpoint like this:
<?php
$app_id = "YOUR_APP_ID"; // your app id
$app_secret = "YOUR_APP_SECRET"; // your app secret
$auth_key = $_GET['auth_key']; // the returned auth key from previous step

$get = file_get_contents("https://virtuala.site/api/authorize?app_id=$app_id&app_secret=$app_secret&auth_key=$auth_key");

$json = json_decode($get, true);
if(!empty($json['access_token'])) {
$access_token = $json['access_token']; // your access token
}
?>
To Log in with Virtualbook on your site Log in With system is a fast and convenient way for people to create accounts and log into your app. Our Log in With system enables two scenarios, authentication and asking for permissions to access people's data. You can use Login With system simply for authentication or for both authentication and data access. Starting the OAuth login process, You need to use a link for your app like this: <a href="https://virtuala.site/api/oauth?app_id=63989374768180">Log in With Virtualbook</a> The user will be redirect to Log in With page like this: Once the user accpeted your app, the user will be redirected to your App Redirect URL with auth_key like this: https://mydomain.com/my_redirect_url.php?auth_key=AUTH_KEY This auth_key valid only for one time usage, so once you used it you will not be able to use it again and generate new code you will need to redirect the user to the log in with link again. Access Token Once you get the user approval of your app Log in With window and returned with the auth_key which means that now you are ready to retrive data from our APIs and to start this process you will need to authorize your app and get the access_token and you can follow our steps to learn how to get it. To get an access token, make an HTTP GET request to the following endpoint like this: <?php $app_id = "YOUR_APP_ID"; // your app id $app_secret = "YOUR_APP_SECRET"; // your app secret $auth_key = $_GET['auth_key']; // the returned auth key from previous step $get = file_get_contents("https://virtuala.site/api/authorize?app_id=$app_id&app_secret=$app_secret&auth_key=$auth_key"); $json = json_decode($get, true); if(!empty($json['access_token'])) { $access_token = $json['access_token']; // your access token } ?>
Wow
Like
Love
6
0 نظرات 0 اشتراک‌گذاری‌ها 169 بازدیدها 2 نقد و بررسی‌ها
حمایت‌شده
حمایت‌شده
حمایت‌شده
حمایت‌شده
حمایت‌شده
GitHub
حمایت‌شده
Virtuala FansOnly https://virtuala.site