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 AuthenticateInDesktop
To run any of the above files go to path
for file then php filename.
Application.php
or
AuthenticateInWebApplication.php in
the terminal.
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

What's hot

Cisco prime network 4.1 technical overview
Cisco prime network 4.1 technical overviewCisco prime network 4.1 technical overview
Cisco prime network 4.1 technical overviewsolarisyougood
 
Wireless lan controller
Wireless lan controllerWireless lan controller
Wireless lan controllerGenx System
 
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스BOAZ Bigdata
 
xAPI Download - Intro to cmi5
xAPI Download - Intro to cmi5xAPI Download - Intro to cmi5
xAPI Download - Intro to cmi5William Welder
 
도커 학습과 Boot2Docker
도커 학습과 Boot2Docker도커 학습과 Boot2Docker
도커 학습과 Boot2Dockerpyrasis
 
요구사항과 테스트 설계
요구사항과 테스트 설계요구사항과 테스트 설계
요구사항과 테스트 설계kimjoohyuk
 
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1Ji-Woong Choi
 

What's hot (12)

Aruba mobility access switch useful commands v2
Aruba mobility access switch useful commands v2Aruba mobility access switch useful commands v2
Aruba mobility access switch useful commands v2
 
Cisco prime network 4.1 technical overview
Cisco prime network 4.1 technical overviewCisco prime network 4.1 technical overview
Cisco prime network 4.1 technical overview
 
Wireless lan controller
Wireless lan controllerWireless lan controller
Wireless lan controller
 
Reverse shell
Reverse shellReverse shell
Reverse shell
 
OWASPTop10_Introduction
OWASPTop10_IntroductionOWASPTop10_Introduction
OWASPTop10_Introduction
 
EMEA Airheads- Aruba Central with Instant AP
EMEA Airheads- Aruba Central with Instant APEMEA Airheads- Aruba Central with Instant AP
EMEA Airheads- Aruba Central with Instant AP
 
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스
제 14회 보아즈(BOAZ) 빅데이터 컨퍼런스 - [카페 어디가?팀] : 카페 및 장소 추천 서비스
 
xAPI Download - Intro to cmi5
xAPI Download - Intro to cmi5xAPI Download - Intro to cmi5
xAPI Download - Intro to cmi5
 
도커 학습과 Boot2Docker
도커 학습과 Boot2Docker도커 학습과 Boot2Docker
도커 학습과 Boot2Docker
 
요구사항과 테스트 설계
요구사항과 테스트 설계요구사항과 테스트 설계
요구사항과 테스트 설계
 
Server model-comparison
Server model-comparisonServer model-comparison
Server model-comparison
 
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
 

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

Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)Praveen Hanchinal
 
Import google contacts with php or javascript using google contacts api and o...
Import google contacts with php or javascript using google contacts api and o...Import google contacts with php or javascript using google contacts api and o...
Import google contacts with php or javascript using google contacts api and o...Design 19
 
Build Android App using GCE & GAE
Build Android App using GCE & GAEBuild Android App using GCE & GAE
Build Android App using GCE & GAELove Sharma
 
How to build and deploy app on Replit
How to build and deploy app on ReplitHow to build and deploy app on Replit
How to build and deploy app on Replitmatiasfund
 
A Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfA Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfiDataScientists
 
Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using ClearbitCustomer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using ClearbitJanBogaert8
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...Restlet
 
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
 
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
 
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
 
technetry Broucher.pdf
technetry Broucher.pdftechnetry Broucher.pdf
technetry Broucher.pdfTechEntry
 
#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
 

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

Google App Engine (Introduction)
Google App Engine (Introduction)Google App Engine (Introduction)
Google App Engine (Introduction)
 
Import google contacts with php or javascript using google contacts api and o...
Import google contacts with php or javascript using google contacts api and o...Import google contacts with php or javascript using google contacts api and o...
Import google contacts with php or javascript using google contacts api and o...
 
Build Android App using GCE & GAE
Build Android App using GCE & GAEBuild Android App using GCE & GAE
Build Android App using GCE & GAE
 
How to build and deploy app on Replit
How to build and deploy app on ReplitHow to build and deploy app on Replit
How to build and deploy app on Replit
 
A Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdfA Comprehensive Guide Of API Development.pdf
A Comprehensive Guide Of API Development.pdf
 
Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using ClearbitCustomer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
Customer Automation Masterclass - Workshop 1: Data Enrichment using Clearbit
 
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
 
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...
 
AIR & API
AIR & APIAIR & API
AIR & API
 
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
 
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
 
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
 
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)
 
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
 
technetry Broucher.pdf
technetry Broucher.pdftechnetry Broucher.pdf
technetry Broucher.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
 

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

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
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
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 

Recently uploaded (20)

Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
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
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 

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 AuthenticateInDesktop To run any of the above files go to path for file then php filename. Application.php or AuthenticateInWebApplication.php in the terminal.
  • 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.