Authentication

Learn how to authenticate your API requests to access Cloutfit's resources.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a

requires authentication
badge in the documentation below.

You can retrieve your token in your dashboard in Tokens.

Authentication Headers

Header Name

Authorization

Header Value

Bearer {YOUR_AUTH_KEY}

Social Match

Cloutfit's Social Match feature allows you to connect social media accounts to your API requests for enhanced functionality.

When using Social Match, you'll need to include additional parameters in your requests to specify which social media platform you're targeting.

Secure Access

All API requests are encrypted and authenticated using industry-standard protocols.

API Keys

Generate and manage multiple API keys for different applications or environments.

Rate Limiting

API requests are rate-limited based on your subscription plan to ensure fair usage.

Token Management

You can manage your API tokens through the Cloutfit dashboard. Each token has specific permissions and can be revoked at any time.

We recommend using different tokens for development and production environments to maintain security.

Token Lifecycle

  1. Generate a new token from your Cloutfit dashboard
  2. Store the token securely in your application's environment variables
  3. Use the token in your API requests as shown in the examples
  4. Rotate tokens periodically for enhanced security
  5. Revoke tokens that are no longer needed or may have been compromised

Authentication Examples

cURL Example
curl --request GET \
  --url "https://app.cloutfit.ai/api/v1/influencers" \
  --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
  --header "Content-Type: application/json" \
  --header "Accept: application/json"

Error Responses

Authentication Error
{
    "error": {
        "code": "authentication_required",
        "message": "Authentication is required to access this resource.",
        "status": 401
    }
}
Invalid Token Error
{
    "error": {
        "code": "invalid_token",
        "message": "The provided API token is invalid or has expired.",
        "status": 401
    }
}
Insufficient Permissions Error
{
    "error": {
        "code": "insufficient_permissions",
        "message": "Your API token does not have permission to access this resource.",
        "status": 403
    }
}