Guides
Environment
What comes in the LinkedIn Ads sandbox, how to swap the base URLs, the personas, the accounts, the ids and the clock.
Each Mimicr organization has one LinkedIn Ads sandbox. It holds a developer app, a LinkedIn organization, the members, the ad accounts and everything your integration creates.
Base URLs
An integration usually has two variables: the OAuth base (https://www.linkedin.com) and the API base (https://api.linkedin.com). On Mimicr both point at the same host:
LINKEDIN_OAUTH_BASE_URL=https://linkedin-ads.mimicr.dev LINKEDIN_API_BASE_URL=https://linkedin-ads.mimicr.dev LINKEDIN_CLIENT_ID=<client_id> LINKEDIN_CLIENT_SECRET=<client_secret> LINKEDIN_VERSION=202610
The image upload and download URLs the API returns already carry Mimicr's host.
The developer app
| Item | Value |
|---|---|
client_id | 14 lowercase characters (9vem0tlt63qrfg) |
client_secret | 16 characters. It is also the HMAC key of the webhook challenge and signature |
| Redirect URLs | Empty at first; register them with PUT /v1/linkedin-ads/app |
| Products | Advertising, Lead Sync and Conversions. They decide which scopes the consent page accepts |
| Access tier | development: unlimited reads, writes on up to 5 accounts of the tier's list |
PUT /v1/linkedin-ads/app also changes the name and the products and generates a new secret (rotate_secret). See Sandbox control.
Seed data
| Resource | Value |
|---|---|
| Organization | "Mimicr Demo Ltda", urn:li:organization:{id}, vanityName mimicr-demo |
| Account "Conta Principal" | BUSINESS, BRL, RUNNABLE, with its "Default Campaign Group". Full delivery and reporting |
| Account "Conta de Teste" | BUSINESS, USD, test: true, with its "Default Campaign Group". Creatives auto-rejected (TEST_ADS) and no reporting |
| Persona | Member | Role on Conta Principal | Organization role |
|---|---|---|---|
admin (default) | Ana Admin | ACCOUNT_BILLING_ADMIN (also on Conta de Teste) | ADMINISTRATOR |
campaign_manager | Carlos Campanhas | CAMPAIGN_MANAGER | None |
creative_manager | Cris Criativos | CREATIVE_MANAGER | DIRECT_SPONSORED_CONTENT_POSTER |
viewer | Vera Visualiza | VIEWER | None |
no_accounts | Nina Semcontas | None | None |
cancel_login | Only on the consent page |
Use the personas to test roles: viewer gets 403 NO_PERMISSION_ON_ENTITY on any write, campaign_manager can't read leads (no organization role) and no_accounts gets elements: [] from the member's ad accounts. The member.create action creates other members, with roles and an email (used by Conversions API matching).
Ids and URNs
| Entity | Format in Mimicr |
|---|---|
| Member | 10 characters, urn:li:person:yLp4Ms3J8- |
| Ad account | 9 digits starting with 5, urn:li:sponsoredAccount:521119150 |
| Campaign group | 9 digits starting with 6, urn:li:sponsoredCampaignGroup:690078541 |
| Campaign | 9 digits starting with 3, urn:li:sponsoredCampaign:347365458 |
| Creative | The id is the URN, urn:li:sponsoredCreative:166531097 |
| Post | urn:li:ugcPost:7000000002514225466 (dark) or urn:li:share:… |
| Image | urn:li:image:D4E10AQ… |
| Form | 19 digits, urn:li:leadGenForm:6700000002689218625 |
| Lead | A UUID and a suffix, urn:li:leadGenFormResponse:4aa37137-…-2 |
| Conversion rule | 6 digits, urn:lla:llaPartnerConversion:752612 |
Numeric ids are JSON numbers in bodies and strings in x-restli-id. A reset with the same seed gives the same ids.
Money and time
- Money is
{"amount": "150.00", "currencyCode": "BRL"}: a decimal string in major units, never micros or cents. The currency must be the account's (CURRENCY_MISMATCH). - Schedule, creation and conversion times are epoch milliseconds.
adAnalyticsuses{year, month, day}objects in UTC. - Daily budgets reset at midnight UTC.
Clock
The sandbox has its own clock. Advancing it expires codes (30 min), access tokens (60 days) and refresh tokens (365 days), finishes reviews, generates the delivery hours, completes campaigns, runs webhook retries and re-validations, sunsets versions and resets the daily quotas:
npx mimicr clock linkedin-ads +2h
The reset (POST /v1/linkedin-ads/reset) brings back the organization, the personas and both accounts, deletes the rest, keeps the app and the settings and sets the clock back to real time.