OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
oauth
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
11/28/2024 11:03:35 AM
rwxrwxr-x
📄
callback.php
714 bytes
09/30/2021 01:09:04 PM
rw-r--r--
📄
composer.json
63 bytes
09/30/2021 11:52:51 AM
rw-r--r--
📄
composer.lock
15.57 KB
09/30/2021 11:52:47 AM
rw-r--r--
📄
config.php
226 bytes
01/26/2024 03:40:25 PM
rw-r--r--
📄
getLiId.php
549 bytes
09/30/2021 11:52:50 AM
rw-r--r--
📄
index.php
242 bytes
09/30/2021 11:52:48 AM
rw-r--r--
📄
postToLi.php
549 bytes
09/30/2021 11:52:52 AM
rw-r--r--
📁
vendor
-
09/30/2021 11:53:46 AM
rwxr-xr-x
Editing: callback.php
Close
<?php require_once 'config.php'; require_once 'vendor/autoload.php'; use GuzzleHttp\Client; try { $client = new Client(['base_uri' => 'https://www.linkedin.com']); $response = $client->request('POST', '/oauth/v2/accessToken', [ 'form_params' => [ "grant_type" => "authorization_code", "code" => $_GET['code'], "redirect_uri" => REDIRECT_URL, "client_id" => CLIENT_ID, "client_secret" => CLIENT_SECRET, ], ]); $data = json_decode($response->getBody()->getContents(), true); $access_token = $data['access_token']; // store this token somewhere } catch(Exception $e) { echo $e->getMessage(); }