$parameters = ['access_type' => 'offline'];
$driver = Socialite::driver('google')->with($parameters);
$user = $driver->stateless()->user();
// dd($user);
$accessToken = $user->token;
$authorizationCode = $_GET['code'];
// $this->afterGoogleCallback($user,$authorizationCode,$accessToken);
$accessToken = $user->token;
$oauth2Token = (new OAuth2TokenBuilder())
->withAccessToken($user->token)
->build();
// Load the OAuth2 credentials from a file (google_ads_php.ini).
$credentialsLoader =
CredentialsLoader::fromFile(public_path('google_ads_php.ini'));
// Build the Google Ads client
$start = Carbon::now()->startOfMonth();
$start = $start->format('Y-m-d');
$end = Carbon::now()->format('Y-m-d');
// dd($start,$end);
$campaignQuery = "SELECT
campaign.id,
campaign.start_date,
campaign.name,
campaign.status,
metrics.clicks,
metrics.impressions,
metrics.cost_micros,
SELECT
campaign.id,
campaign.name,
campaign.status,
campaign_budget.amount_micros,
metrics.clicks,
metrics.impressions,
metrics.cost_micros,
metrics.conversions,
metrics.cost_per_conversion,
segments.date
FROM
campaign
WHERE
segments.date BETWEEN '$start' AND '$end'
ORDER BY campaign.id
this is
Dear Google Ads API Team,
I am trying to run several Python scripts to get dashboards or other infos
from my campaigns, but had no success in almost every one.
Also, I've already been conceived as an Administrator in my company's MCC
and in the specific Account which we want to be the
Hi,
I am trying to run a sample code in Python to use google query language but
I'm getting the error as above. However, I've already managed to do a
script that returns all of my campaigns.
*The current script that I'm trying to run is this:*
import google.auth
from
My developer token has been pending approval for over 2 weeks, how
can I contact the adwords team?
The contact page does not have a category for api:
http://adwords.google.com/support/aw/bin/request.py?display=categories
Thanks.
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us