Skip to navigation

Authentication

Every request carries your partner credential as a bearer token.

Authorization: Bearer pc_live_<selector>.<secret>
curl https://campino.tech/api/v1/partner/audience/searches/$REQUEST_ID \
-H "Authorization: Bearer $CAMPINO_PARTNER_KEY"

Getting a credential

We issue the credential for you. Contact us with the name of your integration. It is shown once, when we hand it over, and we store only a hash of it.

A lost credential is replaced, not recovered. Put it in your secret manager as soon as you receive it, and never ship it in client-side code.

Formatpc_live_ followed by a selector, a dot and a secret
LifetimeOne year by default
RotationAsk us for a new one. The old credential keeps working for 24 hours, so you can deploy without a gap
RevocationAsk us. A revoked credential stops working at once
Address allow-listOptional. If we set one, requests from other addresses answer 401

What the credential spends

The credential acts on your Campino account and its wallet. Searches and purchases are charged to that wallet. Top up the wallet before you submit: a search that the balance does not cover answers 400 and nothing is charged.

When authentication fails

Every credential problem answers the same way, so a response never tells an attacker which part was wrong.

{
"status": "failure",
"data": null,
"error": { "code": 4012, "message": "Invalid partner credential", "fields": null }
}

The status is 401 and the response carries WWW-Authenticate: Bearer. It means the credential is missing, malformed, unknown, revoked or expired, the request came from an address outside the allow-list, or the Authorization header was sent twice.