canonical: https://jentic.com/apis/googleapis.com/adsensehost

# Google AdSense Host API

The AdSense Host API gives AdSense host partners programmatic access to publisher onboarding workflows, ad code generation, and reporting on host-managed publisher accounts. It is intended for platforms that embed AdSense for content into their own products and need to associate end-publisher accounts. The interface is narrow by design and centres on starting and verifying association sessions between the host and a publisher's AdSense account.

## For AI agents

Start and verify AdSense association sessions so an AdSense host platform can onboard a publisher account programmatically.

## Scope

Does not handle ad code generation, earnings reporting, or ad unit configuration - use for AdSense host association sessions only.

## Capabilities

- Start an AdSense association session that hands a publisher off to Google to link their account to the host platform
- Verify a returned association token so the host platform can confirm the publisher account binding succeeded
- Onboard publisher accounts into a host's content monetisation product without scraping the AdSense console
- Generate redirect URLs for the AdSense Host association flow within an existing signup pipeline
- Confirm association session state before enabling ad serving for a publisher in the host product

## Use cases

### Programmatic Publisher Onboarding

Hosting platforms that monetise third-party content with AdSense use the Host API to link an end-publisher's AdSense account to the host without scraping the AdSense web console. The flow has two calls: start an association session, then verify the resulting token after the publisher is redirected back. End-to-end onboarding can be automated inside an existing publisher signup pipeline rather than requiring manual account linking.

Example prompt: Call POST /adsensehost/v4.1/associationsessions/start with the host's productCode and websiteUrl, return the redirect URL to the publisher, then verify the returned token via /adsensehost/v4.1/associationsessions/verify.

### Association State Verification

Once a publisher returns from the AdSense association screen, the host platform must verify the token attached to the redirect before enabling ad serving. The verify endpoint confirms whether the association completed and returns the bound AdSense account ID. This lets the host distinguish between aborted, in-progress, and completed associations and only flip the publisher's monetisation flag when the association is final.

Example prompt: Call associationsessions/verify with the token from the redirect query string and persist the returned AdSense accountId only if the response indicates the association succeeded.

### Agent-Driven Publisher Activation

An agent integrating AdSense Host through Jentic searches for the association operation, loads the schema, and executes the start and verify calls during a publisher signup. Jentic isolates the host's OAuth credentials so the agent never sees the refresh token, and surfaces only the parameters needed to redirect the publisher and confirm the result. Integration time drops from a multi-day OAuth implementation to under an hour.

Example prompt: Use the Jentic search query 'start an AdSense host association session' to discover the operation, then execute the start and verify calls with the host productCode and the publisher's website URL.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /adsensehost/v4.1/associationsessions/start | Start an AdSense host association session and return the publisher redirect URL |
| GET | /adsensehost/v4.1/associationsessions/verify | Verify the token returned after the publisher completes the association screen |

## Key resources

- **Association Sessions** — Start and verify the OAuth-style handoff that links a publisher's AdSense account to the host platform

## Why Jentic

- **Setup:** Wiring the AdSense Host API by hand means configuring Google OAuth 2.0 with the adsensehost scope, exchanging a refresh token for short-lived access tokens, and pointing calls at the adsensehost.googleapis.com host. Through Jentic you install once, import the AdSense Host API from the API Directory, store the OAuth credential once, and your agent calls it.
- **Permission scoping:** The AdSense Host API exposes only association-session operations, so you limit the agent to the operations it needs, such as starting or verifying a host association session. There is no ad-code or earnings surface behind it, so those actions are not reachable through this API.
- **Credential handling:** Your Google OAuth credential is stored once, encrypted, by your own Jentic One instance and exchanged for short-lived access tokens at execution time. The refresh token never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'start an AdSense host association session' or 'verify an association session', and Jentic returns the matching AdSense Host operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **AdSense Management API** — AdSense Management exposes reporting and account data for the publisher side, while AdSense Host covers the platform-to-publisher association.
- **AdMob API** — AdMob covers in-app advertising monetisation for mobile apps rather than web publisher onboarding.
- **DoubleClick Bid Manager API** — DoubleClick Bid Manager handles programmatic media buying, often paired with AdSense Host on the supply side.

## FAQ

### What authentication does the AdSense Host API use?

The AdSense Host API uses OAuth 2.0 with the adsensehost scope. Through Jentic, the host platform's OAuth refresh token is stored encrypted in your Jentic One instance and the agent receives only short-lived scoped access tokens, never the raw refresh token.

### Can I onboard a publisher's AdSense account through the API without using the AdSense console?

Yes. Call associationsessions/start to obtain a redirect URL, send the publisher to that URL, and call associationsessions/verify with the returned token to confirm and capture the AdSense accountId.

### What are the rate limits for the AdSense Host API?

The API is governed by the standard Google AdSense host quota and the per-project Cloud quota. Monitor usage in the Google Cloud Console quotas page for the AdSense Host API and request additional quota if a host platform expects high signup throughput.

### How do I start an association session for a new publisher through Jentic?

Search Jentic for 'start an AdSense host association session', load the schema for /adsensehost/v4.1/associationsessions/start, and execute it with productCode, websiteUrl, and userLocale. Run pip install jentic and use the async search, load, execute pattern.

### Is the AdSense Host API free?

API calls themselves are free; revenue share terms apply only to the underlying AdSense host product agreement. Google does not bill per request to the Host API surface.

### How few endpoints does this API really have?

Just two: associationsessions/start and associationsessions/verify. The Host API only covers the association handoff; reporting and ad unit management live in other AdSense surfaces.

### Can I limit what my agent is allowed to do with the AdSense Host API?

Yes. Because Jentic One is self-hosted, your own rules decide which AdSense Host operations and credentials the agent may use, so you can allow just starting a host association session, just verifying a returned token, or both. The API exposes only these association-session operations, and there is no ad-code or earnings surface behind it, so those actions are not reachable at all through this API. Your Google OAuth credential stays in your own instance and is exchanged for short-lived access tokens at call time, so the agent never handles the refresh token directly.
