Guides
Getting started

Sandbox testing

Mimicr's test triggers, the homologation toggles (strict by default) and chaos per area.

TikTok documents no magic test values. Every trigger below is Mimicr's own and only works in the sandbox. They match PopGás's FakeAdPlatformGateway, so e2e scripts work on both.

Triggers

WhereValueEffect
ad_text or ad_name[reprovar]Review ends rejected: UNAVAILABLE, AD_STATUS_AUDIT_DENY, reason "The product/service displayed in the ad image/video is not consistent with the product/service on the landing page." and an AD webhook (object 3)
ad_text or ad_name[parcial]Partial approval: PART_AVAILABLE, forbidden_placements: ["PLACEMENT_PANGLE"]
ad_text or ad_name[falha-simulada]The create or update answers 51003 Internal service error. Please try again later.
adgroup_name[reprovar]The ad group is rejected (ADGROUP_STATUS_AUDIT_DENY) after the review delay, with an AD_GROUP webhook (object 2)
campaign_name[conflito]The first 2 writes on that campaign answer 40202 Write or update entity conflict.
video_url or image_urlcontains fail-download40002 failed to download.
video_urlcontains no-audioThe upload works, but the ad is rejected with the no-audio reason
Ad group budget13.1340002 Budget must be at least 20.00 BRL.
user.email in the Events APISHA-256 of reject@mimicr.devThe event is unmatched (accepted, left out of reports)
Lead fields"phone_number":"+550000000000"The first webhook attempt fails; the immediate retry delivers

Review

New ads enter review (AD_STATUS_AUDIT) and the automatic reviewer decides reviewDelayMinutes (default 10) sandbox minutes later: it approves, unless a trigger above says otherwise. To decide right away, use the ad.approve, ad.partial, ad.reject and adgroup.reject actions, or advance the clock. See Ads and review.

Homologation toggles

The sandbox is strict by default: fields the docs mark as required are enforced, as in production.

ToggleDefaultEffect
autoReviewtrueThe automatic reviewer decides ads in review
reviewDelayMinutes10Sandbox minutes until the automatic decision
anyRedirectUritrueThe authorization page accepts any http(s) redirect_uri; when off, only the app's registered ones
lenientRequiredFieldsfalseWhen on, accepts what older integrations omit: pacing (becomes PACING_MODE_SMOOTH), identity_id (created from display_name) and the cover image_ids (automatic cover)
disableOutranksReviewfalseWhen on, the pause shows above the review in secondary_status (a paused ad in review reads AD_STATUS_CAMPAIGN_DISABLE)
adgroupUpdateAsPatchfalseWhen on, /adgroup/update/ keeps omitted fields instead of replacing the whole ad group
uniqueNamestrueRefuses a repeated campaign name (and ad group name within a campaign) without a different request_id
enforceRateLimitsfalseApplies the per-app, per-route and per-advertiser rate limits
asyncReportSeconds30Sandbox seconds until an asynchronous report is ready
autoLeadsfalseEach lead counted in the delivery of a LEAD_GENERATION ad group becomes a real lead, with a webhook
batchWebhooksfalseGroups the leads due in the same sweep into one delivery
reportWebhookstrueEnables REPORT_DATA_CHANGE subscriptions (allowlist-only on TikTok)
bash
curl --request PUT \
  --url https://api.mimicr.dev/v1/tiktok-ads/homolog \
  --header 'Authorization: Bearer mk_...' \
  --header 'Content-Type: application/json' \
  --data '{ "lenientRequiredFields": true, "reviewDelayMinutes": 1 }'

Use lenientRequiredFields and adgroupUpdateAsPatch only while your integration is being fixed. TikTok's docs require pacing, identity_id and the video cover and say /adgroup/update/ is a full replacement.

Production rules the sandbox already applies

  • Accounts created on or after 2026-01-15 cannot create ads with a custom identity on TikTok placements. Test it with advertiser.create customIdentity=false or advertiser.set_custom_identity allowed=false.
  • STATUS_LIMIT accounts (the "Bloqueada" one) read ADVERTISER_ACCOUNT_PUNISH on campaigns, ad groups and ads and do not deliver.
  • The synchronous report with stat_time_day accepts at most 30 days, and deleted objects disappear from reports and lists without STATUS_ALL.

Chaos

Each area takes configurable failures: latency, an error before or after processing, and operation failures.

AreaCoversFailures
oauthThe auth_code exchange51003, 40100
managementAccounts, campaigns, ad groups, ads, files and identities40202 (writes only), 51003, 40100
reportingSynchronous and asynchronous reports51003, 40100
events/event/track/51003, 40100
leadsLead and subscription routes51003, 40100
webhookWebhook deliveriesFirst-attempt failure and duplicate deliveries

A chaos 500 comes back as HTTP 200 with 51003, a 429 as HTTP 200 with 40100, and a 503 stays HTTP 503 with 50000. The authorization page, the form, the click and the report files are exempt. Examples in Sandbox control.