Getting Started With the Ownli API
Obtain meaningful customer data by, get this... just asking. Ownli is a personal-data marketplace that allows you to attract, retain, and engage directly with potential and existing customers.
Authentication
To use the Ownli API, you'll need API credentials (partnerId, clientId, and clientSecret). Reach out to us at support@ownli.co to request your credentials.
JWT Authentication (Recommended)
Ownli uses JWT (JSON Web Token) Bearer authentication. Instead of sending your credentials with every request, you exchange them once for a short-lived access token and then use that token for all subsequent calls.
Step 1: Obtain a token
- cURL
curl -X POST https://api.sandbox.ownli.app/api/auth/token \
-H "Content-Type: application/json" \
-d '{
"clientId": "your-client-id",
"clientSecret": "your-client-secret",
"partnerId": "your-partner-id"
}'
Response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"partner_id": "your-partner-id"
}
Step 2: Use the token
Include the access_token in the Authorization header of every API request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Tokens expire after 1 hour. When a token expires, request a new one from the token endpoint.
Legacy Header Authentication (Deprecated)
Legacy header authentication is deprecated and will be removed in a future release. Please migrate to JWT Bearer authentication.
The legacy method passes credentials as headers on every request:
partnerId— Your partner IDclientId— Your client IDclientSecret— Your client secret
This method still works but sends your secret on every request. JWT authentication is more secure because your credentials are only transmitted once.