SlideShare a Scribd company logo
1 of 25
Download to read offline
How to
Integrate
Google
Adwords API
in Laravel
App?
https://www.bacancytechnology.com/
Introduction
Have you encountered a requirement
where you need to implement Google Ads
API? If yes, and wondering how can you do
it then here is a blog for you! A few weeks
back, one of our developers had a
requirement for Google Adwords API
integration in the laravel application. And
searching for a proper tutorial was a real
struggle! That’s when it struck us to come
up with a tutorial for fellow Laravel
developers.
Without further ado, let’s move ahead and
see how to integrate Google Adwords API in
Laravel App.
Required
Package
We will be needing the following packages
to integrate Google Adwords API in
Laravel App.
googleads/google-ads-php
PHP client library for the Google Adwords
API.


ext-bcmath
BCMath is a PHP extension helping us
with float values. BC is known for Binary
Calculator in BCMath.


ext-grpc
The framework gRPC will be used for
developing scalable APIs. It will lessen our
struggle and allow transparent client-
server communication and connected
systems.
ext-protobuf
The protobuf implements Protocol Buffer
of Google for PHP language that supports
serialization of binary data and includes a
protoc plugun for generating classes from
.proto files.
Update composer.json
with the following
packages
composer require googleads/google-ads-
php
composer require ext-bcmath
composer require ext-grpc
composer require ext-protobuf
Required PHP
Extension
Bcmatch
Grpc
Protobuf
Soap
Make sure you have the following PHP
modules in your system to integrate
Google Adwords API.
Stop searching for the best
Laravel developers.
Because here we are!


Bacancy will provide you proficient and
dedicated developers with fundamental
and advanced Laravel knowledge. Contact
us to hire Laravel developer today!
Generate
client ID and
client secret
key
Open the Google API Console
Credentials page.
Navigate the following path to create a
project: Select a project > NEW
PROJECT > Enter project’s name OR
Edit the provided project ID. Click
Create.
Select Create credentials and click on
OAuth client ID on the Credentials page.
If prompted for setting the product
name on the Consent screen, click
Configure consent screen, provide the
information asked for, and click Save
and you will return to the Credentials
screen.
Follow these instructions to generate a
client ID and client secret key.
Select the Application type and click
Create
Copy your client ID and client secret as
you will be needing them for
configuring your client library.
Enable Google
Ads API
Open the Google API Console
Credentials page
Navigate to APIs & Services -> Library
Search for Google Ads API
Open the Google Ads API library and
enable it
For using the Google Ads API we will need
to enable it. So, follow these instructions to
enable the Google Adwords API.
Generate
Developer
Token
Login to Google Ads Manager account
Navigate to TOOLS & SETTINGS >
SETUP > API Center. The API Center
option appears only for Google Ads
manager accounts.
Fill out the form to request a developer
token.
Without a developer token, you won’t be
able to proceed further. With the help of the
below steps generate your developer token.




Note: Only approved developer token will
be used for production. A non-approved
developer token can only be used with a
test account.
Generate
Refresh
Token
Run
AuthenticateInDesktopApplication.php
or AuthenticateInWebApplication.php
in the terminal.
To run any of the above files go to path
for file then php filename.
Fetch Data
using Google
Adwords API
in Laravel
App
Copy sample google_ads_php.ini to
home directory.
Set google_ads_php.ini path in app
config.
So, far we are done with the initial project
set up and generating a developer token
for using Google Ads API. Now, let’s do
some coding.


'google_ads_php_path' =>
realpath(base_path('google_ads_php.ini'))
Register GoogleAdsClient in
AppServiceProvider


use
GoogleAdsGoogleAdsLibV9GoogleAdsCl
ientBuilder; use
GoogleAdsGoogleAdsLibOAuth2TokenB
uilder; public function register() { // Binds
the Google Ads API client. $this->app-
>singleton('GoogleAdsGoogleAdsLibV9
GoogleAdsClient', function () { // Constructs
a Google Ads API client configured from the
properties file. return (new
GoogleAdsClientBuilder()) -
>fromFile(config('app.google_ads_php_pat
h')) ->withOAuth2Credential((new
OAuth2TokenBuilder()) -
>fromFile(config('app.google_ads_php_pat
h')) ->build()) ->build(); }); }
Github
Repository:
Google Ads
API
Integration
Demo
You can visit the source code: google-
ads-api-demo and play around with
the code.
Conclusion
I hope the tutorial on integrating Google
Adwords API in Laravel App was helpful to
you. If you have any questions or
suggestions feel free to contact us. For more
such tutorials, visit Laravel tutorials page
where you can clone the repository, start
exploring the code, and learn about more
Laravel.
Thank You
https://www.bacancytechnology.com/

More Related Content

Similar to How to Integrate Google Adwords API in Laravel App.pdf

apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays
 
Deep Dive on CI/CD NYC Meet Up Group
Deep Dive on CI/CD NYC Meet Up GroupDeep Dive on CI/CD NYC Meet Up Group
Deep Dive on CI/CD NYC Meet Up GroupNeerajKumar1965
 
Build Products Developers Love by fmr Twilio Staff Product Manager
Build Products Developers Love by fmr Twilio Staff Product ManagerBuild Products Developers Love by fmr Twilio Staff Product Manager
Build Products Developers Love by fmr Twilio Staff Product ManagerProduct School
 
ERICGil_Updated-2
ERICGil_Updated-2ERICGil_Updated-2
ERICGil_Updated-2eric gil
 
I am sorry Developer, your API just became a Product.pdf
I am sorry Developer, your API just became a Product.pdfI am sorry Developer, your API just became a Product.pdf
I am sorry Developer, your API just became a Product.pdfFrancisco Picolini
 
#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connectpramodvallanur
 
Custom Automation Masterclass – Workshop 2: Email validation using kKckbox
Custom Automation Masterclass – Workshop 2: Email validation using kKckboxCustom Automation Masterclass – Workshop 2: Email validation using kKckbox
Custom Automation Masterclass – Workshop 2: Email validation using kKckboxJanBogaert8
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
 
Ravikant kumar
Ravikant kumarRavikant kumar
Ravikant kumarRavi Kant
 
technetry Broucher.pdf
technetry Broucher.pdftechnetry Broucher.pdf
technetry Broucher.pdfTechEntry
 
How to create your own WordPress plugin using WP App Studio
How to create your own WordPress plugin using WP App StudioHow to create your own WordPress plugin using WP App Studio
How to create your own WordPress plugin using WP App StudioeMarket Design
 
App Indexing: Blurring the Lines Between Your Website and App
App Indexing: Blurring the Lines Between Your Website and AppApp Indexing: Blurring the Lines Between Your Website and App
App Indexing: Blurring the Lines Between Your Website and AppJuan Gomez
 
A Brief Guide on API Integration
A Brief Guide on API Integration A Brief Guide on API Integration
A Brief Guide on API Integration SortdMediology
 
Agencies Developer Products
Agencies Developer ProductsAgencies Developer Products
Agencies Developer ProductsJeff Eddings
 

Similar to How to Integrate Google Adwords API in Laravel App.pdf (20)

apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...apidays LIVE Jakarta - What will the next generation of API Portals look like...
apidays LIVE Jakarta - What will the next generation of API Portals look like...
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Cake Php Consultant
Cake Php ConsultantCake Php Consultant
Cake Php Consultant
 
Deep Dive on CI/CD NYC Meet Up Group
Deep Dive on CI/CD NYC Meet Up GroupDeep Dive on CI/CD NYC Meet Up Group
Deep Dive on CI/CD NYC Meet Up Group
 
Build Products Developers Love by fmr Twilio Staff Product Manager
Build Products Developers Love by fmr Twilio Staff Product ManagerBuild Products Developers Love by fmr Twilio Staff Product Manager
Build Products Developers Love by fmr Twilio Staff Product Manager
 
ERICGil_Updated-2
ERICGil_Updated-2ERICGil_Updated-2
ERICGil_Updated-2
 
API.docx
API.docxAPI.docx
API.docx
 
I am sorry Developer, your API just became a Product.pdf
I am sorry Developer, your API just became a Product.pdfI am sorry Developer, your API just became a Product.pdf
I am sorry Developer, your API just became a Product.pdf
 
#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect#APIOps- Agile API Development powered by API Connect
#APIOps- Agile API Development powered by API Connect
 
Custom Automation Masterclass – Workshop 2: Email validation using kKckbox
Custom Automation Masterclass – Workshop 2: Email validation using kKckboxCustom Automation Masterclass – Workshop 2: Email validation using kKckbox
Custom Automation Masterclass – Workshop 2: Email validation using kKckbox
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
 
Ravikant kumar
Ravikant kumarRavikant kumar
Ravikant kumar
 
Google App Engine tutorial
Google App Engine tutorialGoogle App Engine tutorial
Google App Engine tutorial
 
technetry Broucher.pdf
technetry Broucher.pdftechnetry Broucher.pdf
technetry Broucher.pdf
 
Webcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product DemoWebcast: Apigee Edge Product Demo
Webcast: Apigee Edge Product Demo
 
How to create your own WordPress plugin using WP App Studio
How to create your own WordPress plugin using WP App StudioHow to create your own WordPress plugin using WP App Studio
How to create your own WordPress plugin using WP App Studio
 
ArvindDhakad_PHP
ArvindDhakad_PHPArvindDhakad_PHP
ArvindDhakad_PHP
 
App Indexing: Blurring the Lines Between Your Website and App
App Indexing: Blurring the Lines Between Your Website and AppApp Indexing: Blurring the Lines Between Your Website and App
App Indexing: Blurring the Lines Between Your Website and App
 
A Brief Guide on API Integration
A Brief Guide on API Integration A Brief Guide on API Integration
A Brief Guide on API Integration
 
Agencies Developer Products
Agencies Developer ProductsAgencies Developer Products
Agencies Developer Products
 

More from Katy Slemon

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfKaty Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfKaty Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfKaty Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfKaty Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfKaty Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfKaty Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfKaty Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfKaty Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfKaty Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfKaty Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfKaty Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfKaty Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfKaty Slemon
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfKaty Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfKaty Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfKaty Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfKaty Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfKaty Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfKaty Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfKaty Slemon
 

More from Katy Slemon (20)

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

How to Integrate Google Adwords API in Laravel App.pdf

  • 1. How to Integrate Google Adwords API in Laravel App? https://www.bacancytechnology.com/
  • 3. Have you encountered a requirement where you need to implement Google Ads API? If yes, and wondering how can you do it then here is a blog for you! A few weeks back, one of our developers had a requirement for Google Adwords API integration in the laravel application. And searching for a proper tutorial was a real struggle! That’s when it struck us to come up with a tutorial for fellow Laravel developers. Without further ado, let’s move ahead and see how to integrate Google Adwords API in Laravel App.
  • 5. We will be needing the following packages to integrate Google Adwords API in Laravel App. googleads/google-ads-php PHP client library for the Google Adwords API. ext-bcmath BCMath is a PHP extension helping us with float values. BC is known for Binary Calculator in BCMath. ext-grpc The framework gRPC will be used for developing scalable APIs. It will lessen our struggle and allow transparent client- server communication and connected systems.
  • 6. ext-protobuf The protobuf implements Protocol Buffer of Google for PHP language that supports serialization of binary data and includes a protoc plugun for generating classes from .proto files. Update composer.json with the following packages composer require googleads/google-ads- php composer require ext-bcmath composer require ext-grpc composer require ext-protobuf
  • 8. Bcmatch Grpc Protobuf Soap Make sure you have the following PHP modules in your system to integrate Google Adwords API.
  • 9. Stop searching for the best Laravel developers. Because here we are! Bacancy will provide you proficient and dedicated developers with fundamental and advanced Laravel knowledge. Contact us to hire Laravel developer today!
  • 11. Open the Google API Console Credentials page. Navigate the following path to create a project: Select a project > NEW PROJECT > Enter project’s name OR Edit the provided project ID. Click Create. Select Create credentials and click on OAuth client ID on the Credentials page. If prompted for setting the product name on the Consent screen, click Configure consent screen, provide the information asked for, and click Save and you will return to the Credentials screen. Follow these instructions to generate a client ID and client secret key.
  • 12. Select the Application type and click Create Copy your client ID and client secret as you will be needing them for configuring your client library.
  • 14. Open the Google API Console Credentials page Navigate to APIs & Services -> Library Search for Google Ads API Open the Google Ads API library and enable it For using the Google Ads API we will need to enable it. So, follow these instructions to enable the Google Adwords API.
  • 16. Login to Google Ads Manager account Navigate to TOOLS & SETTINGS > SETUP > API Center. The API Center option appears only for Google Ads manager accounts. Fill out the form to request a developer token. Without a developer token, you won’t be able to proceed further. With the help of the below steps generate your developer token. Note: Only approved developer token will be used for production. A non-approved developer token can only be used with a test account.
  • 18. Run AuthenticateInDesktopApplication.php or AuthenticateInWebApplication.php in the terminal. To run any of the above files go to path for file then php filename.
  • 19. Fetch Data using Google Adwords API in Laravel App
  • 20. Copy sample google_ads_php.ini to home directory. Set google_ads_php.ini path in app config. So, far we are done with the initial project set up and generating a developer token for using Google Ads API. Now, let’s do some coding. 'google_ads_php_path' => realpath(base_path('google_ads_php.ini'))
  • 21. Register GoogleAdsClient in AppServiceProvider use GoogleAdsGoogleAdsLibV9GoogleAdsCl ientBuilder; use GoogleAdsGoogleAdsLibOAuth2TokenB uilder; public function register() { // Binds the Google Ads API client. $this->app- >singleton('GoogleAdsGoogleAdsLibV9 GoogleAdsClient', function () { // Constructs a Google Ads API client configured from the properties file. return (new GoogleAdsClientBuilder()) - >fromFile(config('app.google_ads_php_pat h')) ->withOAuth2Credential((new OAuth2TokenBuilder()) - >fromFile(config('app.google_ads_php_pat h')) ->build()) ->build(); }); }
  • 23. You can visit the source code: google- ads-api-demo and play around with the code.
  • 24. Conclusion I hope the tutorial on integrating Google Adwords API in Laravel App was helpful to you. If you have any questions or suggestions feel free to contact us. For more such tutorials, visit Laravel tutorials page where you can clone the repository, start exploring the code, and learn about more Laravel.