Scan your whole stack
Are you using @trillboards/api-client?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v3.7.27
@trillboards/api-client was last scanned on 29 Nov 2026 at version 3.7.27. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 3.7.27 LATEST | 29 Nov 2026 | No rules fired |
| 3.7.26 | 28 Nov 2026 | No rules fired |
| 3.7.25 | 28 Nov 2026 | No rules fired |
| 3.7.24 | 27 Nov 2026 | Not shown |
| 3.7.23 | 27 Nov 2026 | Not shown |
Findings for v3.7.27. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 3.7.27; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Official TypeScript SDK for the Trillboards advertiser, Partner and Data APIs.
npm install @trillboards/api-client
Requires Node.js 18+. REST uses native fetch; media buying uses the official MCP client and streaming uses its shared SSE parser. Keep buying credentials in your server application.
import { TrillboardsClient } from '@trillboards/api-client';
const client = new TrillboardsClient({
apiKey: 'trb_partner_xxxxx',
});
// List screens
const { data: screens } = await client.screens.list({ limit: 10 });
// Get analytics
const { data: analytics } = await client.analytics.get({ period: 'week' });
// Get earnings
const { data: earnings } = await client.earnings.get({ period: 'month' });
AdvertiserClient calls the existing advertiser and user HTTP operations with the same portal user JWT issued at sign-in. Its operation IDs, request bodies, path and query parameters, headers and responses come from the composed Demand contract. It covers inventory, campaigns, creative uploads, checkout, delivery, measurement, reports and account operations.
import { AdvertiserClient, advertiserRoutes } from '@trillboards/api-client';
const ads = new AdvertiserClient({ token: process.env.TRILLBOARDS_USER_TOKEN! });
const campaigns = await ads.request('adsgetV1AdvertiserAdvertisementList');
const sightings = await ads.request('listAdSightingsInPortal', {
query: { brand: ['Native Brand', 'Another Brand'] },
});
const creative = await ads.request('adsgetV1AdvertiserAdvertisementsIdCreativeReplacementsLatest', {
params: { id: 'campaign-id' },
});
console.log(campaigns, sightings, creative, Object.keys(advertiserRoutes));
Public sign-in and account operations also work through new AdvertiserClient(); the client omits Authorization on operations declared public. Supply body for JSON input, params for path values, query for query values and headers for declared action headers. Multipart operations accept their typed object with Blob/File fields or standard FormData, including explicit filenames. Array query values follow the operation's declared serialization. CSV responses are strings and binary reports are Blob values. Native requests use one transport attempt; write recovery and action keys remain the native operation's contract.
DspClient uses the platform key linked to your DSP seat and types generated from the mounted DSP contract. It calls the existing catalog, creative, bid and reporting operations with one transport attempt.
import {DspClient} from '@trillboards/api-client';
const dsp = new DspClient({apiKey: process.env.TRILLBOARDS_API_KEY!});
const page = await dsp.execute('getAdSlots', {query: {format: 'screens', limit: 200}});
const review = await dsp.execute('getCreative', {params: {id: creativeId}});
console.log(page, review);
Use the returned cursor.next with unchanged filters for the next catalog page. For a new DSP only, new DspClient() can call execute('onboard', {body: ...}); onboarding returns the credential once. Submit creatives and poll the native approval/rejection result. Trillboards pushes OpenRTB requests to your configured bidder; acceptBidResponse is the separate issued-opportunity workflow. Follow the three-flow DSP guide.
AdvertiserBuyingClient uses an advertiser OAuth access token issued for https://api.trillboards.com/openrtb/v2/buying. It calls the same twelve operations used by the native advertiser workflow. TrillboardsClient continues to provide the existing Partner, Data and MCP resources with their own credentials.
import { AdvertiserBuyingClient, ADVERTISER_BUYING_RESOURCE } from '@trillboards/api-client';
const buyer = new AdvertiserBuyingClient({
oauth: {
accessToken: process.env.TRILLBOARDS_ADVERTISER_ACCESS_TOKEN!,
resource: ADVERTISER_BUYING_RESOURCE,
},
});
const inventory = await buyer.searchInventory({
source: 'mixed',
inventoryClass: 'all',
limit: 20,
});
console.log(inventory);
const status = await buyer.getCampaign('campaign-id');
console.log(status);
const stopped = await buyer.stopCampaign('campaign-id', {
idempotencyKey: 'campaign-id-stop-1',
});
console.log(stopped);
| Method | Purpose | Stable action key |
|---|---|---|
searchInventory |
Search O&O and partner inventory | |
previewPlan |
Preview quantities and prices | |
saveCampaign |
Save the campaign draft | Required |
attachCreative |
Attach a selected creative file | Required |
prepareBooking |
Read the exact selection and amount for review | |
createCheckout |
Create checkout for the reviewed selection | Required |
getCampaign |
Read campaign and fulfillment status | |
getDelivery |
Read campaign delivery | |
rebookCampaign |
Create an unpaid draft for new dates | Required |
stopCampaign |
Request a stop and read outstanding line work | Required |
amendFlight |
Amend the supported flight dates | Required |
updateMetadata |
Change campaign name, description or landing page | Required |
Keep the prepared amount, currency and reviewedSelection unchanged when creating checkout. Reuse the same action key and arguments when retrying a write. Buyer retries keep the original request snapshot. Read the returned line states and partial-stop result; externally managed inventory can remain pending owner acknowledgment.
Buyer errors retain code, requestId, recovery and the raw wwwAuthenticate challenge on TrillboardsError. Use the returned recovery details and status link to recover an existing operation.
| Resource | Methods |
|---|---|
client.screens |
list, get, create, delete, getDisplaySettings, patchDisplaySettings, updateDisplaySettings, batchUpdateDisplaySettings |
client.devices |
list, get, create, createBatch, delete, heartbeat |
client.impressions |
create, createBatch |
client.analytics |
get |
client.earnings |
get |
client.webhooks |
list, create, update, delete, test |
client.fleet |
pushCommand, listCommands |
client.audience |
getLive, getHeatmap, getStats |
client.data |
getVenueIntelligence, getUsage, listScreens, getHistory, getAudience, query, stream |
client.errors |
list, get |
client.billing |
setup, createCreditCheckout, purchaseCredits, getUsageSummary, get, getStripeStatus, requestPayout |
client.mediaBuys |
getProducts, discoverInventory, listAccounts, syncAccounts, create, list, update, syncCreatives, getDelivery, close |
client.creativeExperiments |
create, get, configureBrand, generate, importCreative, review, registerVariants, updatePolicy, getRewards, stop |
Use the Creative AI Feedback Loop for complete buying, creative review, serving and correction-aware reward examples. The same partner key works with REST and native MCP buying tools.
Create a credit checkout with a stable key for this exact purchase, then open the returned Stripe URL:
const checkout = await client.billing.createCreditCheckout(
{ tier: 'tier_500' },
{ idempotencyKey: 'my-first-credit-checkout-v1' },
);
console.log(checkout.checkout_url);
After completing payment, read the committed balance:
const balance = await client.billing.getUsageSummary();
console.log(balance.credit_balance_cents, balance.credit_reserved_cents);
Balances and metered amounts retain their exact decimal strings. A saved payment method alone does not fund delivery. Media uses its accepted quote; API usage uses the published API tariff.
Direct purchaseCredits can return requires_action: true with a client_secret. Complete that payment's Stripe authentication, then read the committed balance; retain its operation_id and stable key. The SDK returns these fields unchanged. Stripe Checkout handles authentication in the returned browser flow.
Discover your account and the live product catalog before creating a buy:
try {
const accounts = await client.mediaBuys.listAccounts();
const products = await client.mediaBuys.getProducts({
brief: 'Transit screens for a creative attention test',
pagination: { max_results: 10 },
});
console.log(accounts.accounts, products.products, products.pagination);
} finally {
await client.mediaBuys.close();
}
client.mediaBuys.create takes the native AdCP request, including the account, flight, product/pricing-option identifiers, budget and stable idempotency_key. list accepts media_buy_ids and pagination; update accepts the native revision. Preserve media_buy_id and packages[].package_id for creativeExperiments.create. The MCP task's status describes task execution; the returned media-buy lifecycle, funding and moderation describe delivery readiness. Always release the MCP connection with mediaBuys.close() when finished.
The Data API resources require the scopes declared by their endpoints: read:live, read:historical or stream:live. Screen-list pagination is returned unchanged as has_more and next_offset. Bounded history reads preserve unmeasured values as null.
const history = await client.data.getHistory('YOUR_SCREEN_ID', {
since: '2026-10-01T00:00:00Z',
until: '2026-10-02T00:00:00Z',
limit: 100,
});
console.log(history.metrics);
const controller = new AbortController();
try {
for await (const event of client.data.stream({}, { signal: controller.signal })) {
console.log(event.event, event.data);
if (event.event === 'audience') break;
}
} finally {
controller.abort();
}
The stream forwards connected, audience and in-band error events. Breaking iteration or aborting closes the connection. It is a live tail: reconnect explicitly and use bounded history reads to recover historical data. Creative reward corrections use the guide's canonical-key/revision scan protocol.
MCP tool failures throw McpToolError with the exact tool and original result, including structured error codes and receipts. Protocol/HTTP errors from the official MCP transport remain intact. REST failures use TrillboardsError.
await client.screens.patchDisplaySettings('SCREEN_ID', {
content_fit: {
advertisements: 'fill',
default_streams: 'fill',
self_promo: 'fit',
},
});
await client.devices.createBatch({
defaults: {
display_settings: {
content_fit: { advertisements: 'fill', self_promo: 'fill' },
},
},
devices: [
{ device_id: 'screen-001' },
{
device_id: 'screen-002',
display_settings: { content_fit: { self_promo: 'fit' } },
},
],
});
fit preserves the full creative and may letterbox; fill covers the screen
and may crop its edges. Omit content_fit to leave existing behavior unchanged.
import { TrillboardsClient, TrillboardsError } from '@trillboards/api-client';
try {
await client.screens.get('nonexistent');
} catch (err) {
if (err instanceof TrillboardsError) {
console.log(err.code); // 'screen_not_found'
console.log(err.statusCode); // 404
console.log(err.docsUrl); // 'https://api.trillboards.com/docs/errors#screen_not_found'
if (err.isRateLimited) {
const retryAfter = err.retryAfter; // seconds from Retry-After header
}
}
}
Trillboards webhooks carry a Stripe-style compound signature header
X-Trillboards-Signature: t=<timestamp>,v0=<hex>,v1=<hex> and a separate
X-Trillboards-Timestamp: <unix_seconds> for redundancy.
The verifier accepts either format and rejects payloads outside a 300-second replay window by default.
import { Webhooks } from '@trillboards/api-client';
// Use express.raw for the webhook route so req.body is the exact signed bytes
app.post('/webhooks', express.raw({ type: 'application/json' }), (req, res) => {
try {
const event = Webhooks.constructEvent(
req.body, // raw Buffer or string (NOT JSON.parsed)
req.headers, // IncomingHttpHeaders — case-insensitive lookup
process.env.WEBHOOK_SECRET!,
);
console.log('Event:', event.event, event.data);
res.sendStatus(200);
} catch (err) {
// TrillboardsError with code "webhook_signature_invalid"
res.sendStatus(401);
}
});
Override the replay-window tolerance (default 300s):
const event = Webhooks.constructEvent(req.body, req.headers, secret, {
tolerance: 600, // 10 minutes
});
Upgrading from 0.2.0: the 0.2.0 call shape
Webhooks.constructEvent(payload, signatureString, secret)produced verification failures against the production server because the server signs${timestamp}.${payload}while the 0.2.0 verifier signedpayloadonly. The 0.3.0 verifier handles both formats AND adds replay protection. Migrate to the newWebhooks.constructEvent(payload, req.headers, secret)call shape. The 0.2.0 shape is preserved asWebhooks.constructEventLegacyfor one minor version (logs a deprecation warning).
Full webhook contract: https://api.trillboards.com/docs/integrations/webhook-signature-verification.md
const client = new TrillboardsClient({
apiKey: 'trb_partner_xxxxx', // Required
baseUrl: 'https://api.trillboards.com', // Optional, defaults to production
version: '2024-01-15', // Optional, sent as Trillboards-Version header
});
MIT
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.