Guides
Getting started

Testing in the sandbox

Text triggers to reject, escalate and fail, the test account, the personas and the homologation toggles of the LinkedIn Ads simulator.

LinkedIn documents no magic test values. Mimicr adds its own triggers, with the same vocabulary as the other ads simulators, so you can cause each outcome without waiting for the other side. Everything here is a Mimicr rule.

Text triggers

WhereValueEffect
Creative text: the post commentary, the media or article title, textAd.headline/description or the creative name[reprovar]Review ends REJECTED with MISLEADING_CLAIMS and the REJECTED hold
Same[revisao-manual]Review becomes NEEDS_REVIEW and stays there until creative.approve or creative.reject
Same, or the campaign name[falha-simulada]The create answers 500 INTERNAL_ERROR and nothing is created
Campaign name[sem-entrega]The campaign is eligible but delivers nothing
Campaign name[audiencia-pequena]The estimated audience is 120: CAMPAIGN_AUDIENCE_COUNT_HOLD and 400 AUDIENCE_SIZE_TOO_SMALL on activation
Ad account name[billing-hold]The account starts on BILLING_HOLD
Lead form name[reprovar]Form review ends REJECTED; linked creatives get FORM_HOLD
Conversion event eventIdStarts with rejeitar-The batch is refused with INVALID_USER_IDENTIFICATION_FIELD_VALUE
Conversion event eventIdStarts with nomatch-The event is accepted but never matches a member

Without a trigger, creatives and forms are approved 10 sandbox minutes after entering review. Advance the clock (npx mimicr clock linkedin-ads +10m) or use the review actions.

The test account

The "Conta de Teste" (test: true, USD) behaves as LinkedIn documents: its creatives are rejected with TEST_ADS, never serve and adAnalytics returns nothing. Each app can have at most one test account; creating another answers 400 TEST_ACCOUNT_LIMIT_REACHED. For demos, turn honorTestAccounts off and the test account delivers like the others.

Personas

On the consent page, or in POST /v1/linkedin-ads/token with member, pick the persona for the scenario: admin does everything, campaign_manager can't read leads, creative_manager only touches creatives, viewer gets 403 on every write, no_accounts sees no accounts and cancel_login returns with error=user_cancelled_login. See Environment.

Homologation toggles

ToggleDefaultEffect
lenientRestlioffOn: no LinkedIn-Version uses the latest; tolerates a missing X-Restli-Protocol-Version and X-RestLi-Method (a POST with patch becomes PARTIAL_UPDATE) and unencoded URNs
accessTierdevelopmentdevelopment limits writes to 5 accounts (devAccounts); standard doesn't
programmaticRefreshonOff: the code exchange returns no refresh token
autoBillingonOff: new accounts start on BILLING_HOLD
honorTestAccountsonOff: the test account delivers and has reporting
autoReviewonOff: creatives and forms stay in review until an action
reviewDelayMinutes10Sandbox minutes until the automatic review
autoDeliveryonOff: the delivery model stops; only traffic.deliver creates numbers
deliveryRate1Share of the daily budget the model spends
cpmMultiplier1Multiplies the model's CPM
fx5BRL per USD (costInUsd, floors of other currencies)
demographicsLagHours12Delay of the MEMBER_* pivots
conversionLagMinutes0Delay of attributed conversions in adAnalytics
autoLeadsoffOn: the model turns into real leads (with webhooks) in lead campaigns, up to 20 per hour
requireWebhookValidationonOff: subscriptions are created even if the challenge fails
allowHttpWebhooksoffOn: accepts http webhooks (they are already accepted on localhost)
crmConnectedoffOn: attributedRevenueMetrics gets values
quotaScale, appDailyQuota, memberDailyQuota1, 100000, 10000Daily quotas per endpoint (see Rate limits)
bash
curl --request PUT \
  --url https://api.mimicr.dev/v1/linkedin-ads/homolog \
  --header 'Authorization: Bearer mk_...' \
  --header 'Content-Type: application/json' \
  --data '{ "lenientRestli": true, "reviewDelayMinutes": 0 }'

Keep lenientRestli off in integration tests: that mode catches forgotten headers and unencoded URNs, like the real LinkedIn.

Failures on demand

Chaos injects latency and errors per area: api (500 before or after processing, 503, 504, 409 CONFLICT, 429), oauth (500 on the code exchange), analytics (408 TIMEOUT or empty responses), conversions (rejected batch) and webhooks (first attempt fails, duplicate notifications, challenge failed as if the hash were wrong). The other side's actions (billing, review, clicks, leads, versions, quotas) are in Sandbox control.