TAŇBA-OOH Developers

Authentication and API keys

The public verification calls need no credentials. Everything under https://app.tanba-ooh.kz/api/v1 needs an API key or a console session.

Create a key

An administrator of an operator or authority organisation opens Integrations in the console and creates a key. The secret has the form

tnbk_<prefix>_<secret>

and is shown once. The platform keeps only a hash of it, so a lost key cannot be recovered: revoke it and create another.

Send the key

curl -H 'Authorization: Bearer tnbk_EXAMPLE_secret' https://app.tanba-ooh.kz/api/v1/structures?limit=10

The same routes also work with a console session cookie. A call that changes data must then carry the X-Tanba-CSRF header.

Scopes

ScopeAllows
read:approvalsApprovals, their manifests, media and envelopes, approvals as CSV
read:structuresStructures and their CSV export
read:statsThe operational report and its CSV sections
read:billingBilling periods, the money report and its CSV sections
read:creativesLook creative files up by their hash
read:inventoryThe screens of the market with their sellers and OpenRTB fragments
write:submissionsCreate a submission and upload its media, nothing else
write:playsReport plays from your own CMS; operator administrators only. Ad platform administrators send claims of served plays with it and read their verification
relay:commandsFetch and acknowledge the signed commands of a CMS installation; operator administrators only

Each operation page names the scope it needs.

What a key can never do

Errors

StatuscodeMeaning
401invalid_api_keyThe key is unknown, revoked or malformed
401unauthenticated, session_expiredNo valid session
403key_scope_deniedThe key lacks the scope this call needs
403key_route_deniedNo key may call this route
429rate_limitedToo many requests; wait for Retry-After

Creating a key, revoking it and every refused call of a valid key are written to the audit log of your organisation.