use strict;
use warnings;
use v5.28;
use feature qw(signatures);
no warnings qw(experimental::signatures);
use DDP;

use lib '/mnt/vol/dev/pc/Packages/';
use sqlConn;
use Oauth2;


my $auth = Oauth2->new(
    authorization_endpoint => 'https://www.linkedin.com/oauth/v2/authorization',
    token_endpoint         => 'https://www.linkedin.com/oauth/v2/accessToken',
    grant_type             => 'refresh_token',
    client_id              => "772wac7m82vj48",
    client_secret          => "zOClxQ9xwbriDDqr",
    redirect_uri           => 'https://auth.project-conquer.com/authcode',
    scope                  => 'r_basicprofile%20w_messages',
    user                   => 'info@project-conquer.com',
    code                   => 'AQSDbcYa_70CeqJiwiW8rEa4IJVmMX6PQbJa3hEn-u9A-hE03EHPQEg4dX56yoGov821nHanIvzIbgpyaifx15CwG7tz5HOz-Td4k_Ecq5eTcY3teIe85KmoCXfdVpwQZa7zuRQ8JHNjso1MiHj7cLNrB97vwpLZsWYoY4NRLQdFX2NFcuwHeGbzWsUlCA',
);



my $client_id = $auth->client_id;
my $redirect = $auth->redirect_uri;
my $scope = $auth->scope;

my $code = "https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=$client_id&redirect_uri=$redirect&scope=$scope";

p $code;