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: postToLi.php
Close
<?php require_once 'config.php'; require_once 'vendor/autoload.php'; use GuzzleHttp\Client; $access_token = 'YOUR_ACCESS_TOKEN'; try { $client = new Client(['base_uri' => 'https://api.linkedin.com']); $response = $client->request('GET', '/v2/me', [ 'headers' => [ "Authorization" => "Bearer " . $access_token, ], ]); $data = json_decode($response->getBody()->getContents(), true); $linkedin_profile_id = $data['id']; // store this id somewhere } catch(Exception $e) { echo $e->getMessage(); }