Guides
Environment
Hosts, versions, the default sandbox (accounts and users), ids, money in micros and the sandbox clock.
Hosts and versions
Everything answers at https://google-ads.mimicr.dev, by path:
| Path | Equivalent to |
|---|---|
/o/oauth2/v2/auth | accounts.google.com |
/token, /revoke | oauth2.googleapis.com |
/v1/userinfo | openidconnect.googleapis.com |
/v23/… to /v26/… | googleads.googleapis.com |
/v1/events:ingest, /v1/requestStatus:retrieve | datamanager.googleapis.com |
/mimicr/click/{gclid} | Mimicr only: opens a sandbox click on the final URL |
The Google Ads API answers from /v23 to /v26 with the shapes of v26, the current version. A few documented differences change with the path's version:
| Behaviour | v23 and v24 | v25 | v26 |
|---|---|---|---|
TEST project on a production account | ACTION_NOT_PERMITTED | CLOUD_PROJECT_NOT_APPROVED_FOR_PRODUCTION | same as v25 |
containsEuPoliticalAdvertising required when creating a campaign | yes | yes | only when the campaign targets the European Union |
@type of failures | …v23… / …v24… | …v25… | …v26… |
Any other version answers 404 NOT_FOUND "Method not found.". Ads API routes outside the core answer 501 UNIMPLEMENTED "Not simulated by Mimicr".
The default sandbox
Each organization has one Google Ads sandbox. On activation (or after a reset) it has:
| Account | Status | Who has direct access |
|---|---|---|
MCC (manager: true) | ENABLED | gestor@<org>.mimicr.dev |
| "Conta 1", client of the MCC | ENABLED | through the MCC |
| "Conta pendente", client of the MCC | CANCELED | through the MCC (answers CUSTOMER_NOT_ENABLED) |
| "Conta do anunciante", standalone | ENABLED | anunciante@<org>.mimicr.dev |
The third user, sem-contas@<org>.mimicr.dev, has access to nothing: listAccessibleCustomers answers {} and every account answers USER_PERMISSION_DENIED.
Accounts use BRL and America/Sao_Paulo. The Google Cloud project starts at BASIC (15,000 operations per day) with both APIs enabled. The real ids of each account are in GET https://api.mimicr.dev/v1/google-ads.
Ids and resource names
- Account ids have 10 digits and never carry hyphens in the API (the console shows
123-456-7890). An id with hyphens answers400 requestError: INVALID_CUSTOMER_ID. - Resources are identified by name:
customers/{c}/campaigns/{id},customers/{c}/adGroupAds/{grupo}~{anúncio},customers/{c}/campaignCriteria/{campanha}~{critério}. - In Mimicr, ids come from a per-sandbox counter with 11 digits, like Google's. The location criterion uses the geotarget id (
…~1001552) and the language criterion the language id (…~1014).
Serialization
- Fields are camelCase in JSON; GAQL uses snake_case.
- int64 values (ids, micros, impressions, clicks) are strings:
"costMicros": "1230000". - double values (
ctr,conversions,averageCpc) are numbers. - Enums are their text names. Unset fields and empty lists are omitted.
Money in micros
1,000,000 micros is one unit of the account's currency. R$ 50.00 is "50000000". Amounts must be multiples of 10,000 micros (R$ 0.01). In Mimicr, the minimum daily budget is R$ 1.00.
Sandbox clock
Dates and expirations follow the sandbox clock, which you can advance: POST https://api.mimicr.dev/v1/google-ads/clock/advance or npx mimicr clock google-ads +2h. Advancing it expires tokens (3599 s) and codes (10 min), completes reviews, generates the delivery hours, moves campaigns through their start and end dates, processes conversions, runs webhook retries and rolls the quota day over. A reset brings the clock back to real time.
Requests and request-id
Every Ads API response carries the request-id header, equal to the requestId of failures. Google has no idempotency key: repeating a create creates another resource or hits DUPLICATE_*_NAME, and Mimicr does the same.