google-ads-api-quickstart

Guides developers through Google Ads API credential setup and first campaign retrieval across six client libraries and REST.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill google-ads-api-quickstart-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: google-ads-api-quickstart
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/google-ads-api-quickstart
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill google-ads-api-quickstart-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up the Google Ads API for the first time involves five separate credentials, multiple client libraries, and confusing errors like USER_PERMISSION_DENIED and DEVELOPER_TOKEN_NOT_APPROVED. This Skill walks developers from zero to a working campaign-retrieval request without guesswork. ## Core Features & Use Cases - Credential Setup Guidance: Step-by-step instructions for obtaining a developer token, OAuth2 client ID/secret, refresh token, client customer ID, and login customer ID. - Multi-Language Quickstarts: Detailed setup references for Python, Java, .NET, PHP, Ruby, Perl, and direct REST, with dynamically resolved API and runtime versions. - Error Troubleshooting: Diagnostic checklists for common failures such as USER_PERMISSION_DENIED (missing login_customer_id) and DEVELOPER_TOKEN_NOT_APPROVED (pending token restrictions). - Use Case: A developer needs to query campaigns from a client account managed under a Manager Account. The Skill explains the manager-client hierarchy, generates a working Python script with the correct login_customer_id, and resolves the latest API version before writing any code. ## Quick Start Ask the assistant to help you set up the Google Ads API in your preferred language and run a script that retrieves your campaigns.

Frequently Asked Questions about google-ads-api-quickstart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get started with the Google Ads API?▼

Obtain five credentials first: a developer token from the API Center, an OAuth2 client ID and secret from Google Cloud Console, a refresh token via the gcloud CLI, and your 10-digit client customer ID. Then install a client library or use REST to run a campaign retrieval query.

How do I fix the USER_PERMISSION_DENIED error in Google Ads API?▼

USER_PERMISSION_DENIED usually means you access a client account through a Manager Account but omitted the login_customer_id. Add your 10-digit Manager Account ID as login_customer_id in your configuration so the API routes credentials through the manager hierarchy.

Why does my Google Ads API request fail with DEVELOPER_TOKEN_NOT_APPROVED?▼

A pending developer token can only target Google Ads Test Accounts, not production accounts. Create a Test Manager Account with test client accounts for development, or wait until your token is approved for Explorer, Basic, or Standard Access.

Which Google Ads API client libraries are available?▼

Official client libraries exist for Python, Java, .NET, PHP, Ruby, and Perl, each with its own configuration file format. A direct REST option using HTTP POST to the searchStream endpoint is available for environments without library support.

Can I use the Google Ads API without a client library?▼

Yes, you can call the REST endpoint directly by exchanging a refresh token or service account JWT for an access token, then sending a POST request with a GAQL query to the searchStream endpoint with your developer token in the headers.