Google-Ads-GoogleAds-Client
view release on metacpan or search on metacpan
lib/Google/Ads/GoogleAds/OAuth2ServiceAccountsHandler.pm view on Meta::CPAN
my $time = time;
my $jwt = JSON::WebToken->encode({
iss => $json_key->{client_email},
scope => $self->__formatted_scopes(),
aud => Google::Ads::GoogleAds::Constants::OAUTH2_BASE_URL . "/token",
exp => $time + 3600,
iat => $time,
sub => $self->get_impersonated_email()
},
$json_key->{private_key},
"RS256"
);
my $response = $self->get___lwp_agent()->post(
Google::Ads::GoogleAds::Constants::OAUTH2_BASE_URL . "/token",
{
grant_type => "urn:ietf:params:oauth:grant-type:jwt-bearer",
assertion => $jwt
});
( run in 0.244 second using v1.01-cache-2.11-cpan-4d50c553e7e )