Download the following tools to complete the remaining steps of this tutorial.
oauth2l
The Google Ads API uses OAuth 2.0 as the authorization mechanism. This tutorial uses
oauth2l
, a command-line tool for working with Google OAuth 2.0 to fetch and
print the access and refresh tokens. You can download and install the
pre-compiled binaries from
the GitHub repository.
The instructions for the rest of this guide were verified to work with version
v1.3.0 of the oauth2l
tool and might not work with previous versions due to
differences in application behavior or command line options.
gcloud CLI
As an alternative to the oauth2l tool, you can use gcloud CLI as a way to fetch and print the access and refresh tokens. To install gcloud CLI, follow the instructions at https://cloud.google.com/sdk/docs/install.
The instructions for the rest of this guide were verified to work with the following version of the gcloud tool and might not work with previous versions due to differences in application behavior or command line options.
:~$ gcloud version
Google Cloud SDK 492.0.0
alpha 2024.09.06
beta 2024.09.06
bq 2.1.8
bundled-python3-unix 3.11.9
core 2024.09.06
enterprise-certificate-proxy 0.3.2
gcloud-crc32c 1.0.0
gsutil 5.30
Client library or HTTP client
You can choose to either download a client library or an HTTP client depending on how you'd like to make API calls.
Use a client library
Download and install a client library of your choice.
Use HTTP client (REST)
Download and install curl, the command line tool for transferring data through a URL.