lads_get_ad_account
LinkedIn Ads read low risk
Part of the LinkedIn Campaign Manager Agent.
What it does
Fetches one LinkedIn ad account by ID and returns its full profile: id, name, currency (ISO code used for ALL budgets/bids on this account), type (BUSINESS|ENTERPRISE), status (ACTIVE|DRAFT|CANCELED|PENDING_DELETION|REMOVED), servingStatuses[] (RUNNABLE or hold reasons like BILLING_HOLD, ACCOUNT_TOTAL_BUDGET_HOLD, ACCOUNT_END_DATE_HOLD, RESTRICTED_HOLD, INTERNAL_HOLD, STOP_HOLD), reference (urn:li:organization|urn:li:person), test flag, and notification flags. Use it to confirm an account is servable before launching, to read the currency for budget normalization, and to diagnose billing/budget holds that explain zero delivery. Accuracy notes: no money metrics; budgets are decimal strings in this currency (not micros); servingStatuses is the authoritative 'why isn't this serving' signal — an empty array or [RUNNABLE] means eligible to serve.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Numeric ad account ID (digits only). Normalize: strip any 'urn:li:sponsoredAccount:' prefix and use the bare ID in the path. |
Safeguards
Policy
Strict per-account isolation: only read an account the bearer is scoped to (it must appear in lads_list_ad_accounts for this token). Account data is for reporting/billing/operating on behalf of the authorizing client only — never pooled across clients.
Reminder
Read only accounts the bearer is authorized for; never expose or store account metadata across clients.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
CUSTOMER_NOT_FOUND | No ad account with this ID is visible to the bearer (404), or the account is outside the token's scope. | Verify the account_id via lads_list_ad_accounts; do not retry blindly. | no |
PERMISSION_DENIED | Token lacks r_ads/rw_ads scope or the member has no role on this account (403). | Confirm the member's role on the account; re-authorize with r_ads if the scope is missing. Do not retry without it. | no |
TOKEN_REVOKED | Access token expired/revoked (401). | needs_reauth — refresh once and retry; else prompt the user to reconnect LinkedIn. | yes |
RESOURCE_EXHAUSTED | Rate/quota limit exceeded (429). | Exponential backoff 5/10/20s, cap 60s; honor Retry-After / X-RateLimit-Reset. | yes |
PLATFORM_UNAVAILABLE | LinkedIn 5xx server error. | Retry with backoff (5/10/20s, cap 60s); report if persistent. | yes |
Edge cases
- Account servable -> servingStatuses is empty or [RUNNABLE]; otherwise the array lists hold reasons — surface them verbatim so the user knows why nothing serves.
- BILLING_HOLD / ACCOUNT_TOTAL_BUDGET_HOLD explain zero delivery even with ACTIVE campaigns.
- Account in PENDING_DELETION/REMOVED still returns (performance data retained) — flag as non-operable.
- test=true account: warn that creatives auto-reject and no analytics will ever populate.
- currency may differ from billed currency (e.g., budgets/bids shown in BRL but billed in USD) — surface this caveat when echoing budgets.
- Expired token -> refresh + retry once before surfacing needs_reauth.