Skip to content

Allow extra headers in GoogleAPIToolset #3105

@tonycoco

Description

@tonycoco

We'd like to use the GoogleApiToolset for Google Ads integrations but we need to add an extra header to each request:

import os
from google.adk.tools.google_api_tool import GoogleApiToolset

google_ads_toolset = GoogleApiToolset(
    client_id=os.environ["CLIENT_ID"],
    client_secret=os.environ["CLIENT_SECRET"],
    api_name="googleads",
    api_version="v21",
    # additional_headers={"developer-token": "<YOUR_DEV_TOKEN>"}
)

Something like additional_headers that would pass down into the HTTP request object.

Additional Headers: https://developers.google.com/google-ads/api/rest/auth#developer_token

Example API Endpoint: https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/SearchStream?transport=rest

Happy to help: coconate@google.com

Metadata

Metadata

Labels

help wanted[Community] Extra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions