Authentication overview

SkyBiometry employs a straightforward API key-based authentication mechanism to secure access to its facial recognition and analysis services. This method requires clients to include specific credentials—an api_key and an api_secret—with every request made to the SkyBiometry API. These keys serve to verify the identity of the requesting application or user, ensuring that only authorized entities can consume the service's features, such as face detection, recognition, and emotion analysis. The use of API keys is a common practice for RESTful APIs, providing a balance between ease of implementation and necessary security. All communication with the SkyBiometry API is expected to occur over HTTPS, encrypting the data in transit, including the authentication credentials, to protect against eavesdropping and tampering.

The system is designed to be compatible with various programming environments, offering SDKs in languages such as Python, Java, PHP, Ruby, and .NET. These SDKs abstract the details of constructing authenticated requests, allowing developers to integrate SkyBiometry functionality without manually handling the authentication headers or parameters for each call. The core principle remains consistent across all integration methods: valid credentials must accompany each API request for it to be processed successfully by the SkyBiometry servers. Without proper authentication, requests will be rejected, safeguarding the API from unauthorized usage and potential abuse.

Supported authentication methods

SkyBiometry primarily supports API key authentication. This method is suitable for server-to-server communication and applications where the API keys can be securely stored and managed. It is a direct and efficient way to authenticate requests without the complexity of token-based flows like OAuth 2.0, which are typically used for user delegation or third-party application access. For SkyBiometry, the API keys directly represent the identity and permissions of the application making the request.

SkyBiometry Authentication Methods
Method When to Use Security Level
API Key (api_key, api_secret)
  • Server-side applications
  • Backend services
  • Mobile application backends
  • Internal tools and scripts
  • Scenarios where keys can be securely managed
Moderate (when combined with HTTPS and secure storage)

The api_key identifies the SkyBiometry account, while the api_secret acts as a password for that key, ensuring the authenticity of the request. Both components are critical for successful authentication and must be kept confidential. While API keys offer simplicity, their security relies heavily on how they are stored and transmitted. Best practices dictate that these keys should never be hardcoded directly into client-side applications or publicly exposed code repositories. Instead, they should be managed through environment variables, secret management services, or secure backend proxies to minimize exposure.

For more complex scenarios involving user authorization or delegated access, developers might implement an additional layer of authentication on top of SkyBiometry's API key mechanism. For example, a web application might use OAuth 2.0 for user authentication and then use its own securely stored SkyBiometry API keys to make calls on behalf of the authenticated user. However, SkyBiometry's direct API interaction does not natively support OAuth flows; it relies solely on the provided API key pair for access control.

Getting your credentials

To obtain your SkyBiometry API credentials (api_key and api_secret), you must first register for an account on the SkyBiometry website. Upon successful registration and login, these keys are typically made available in your developer dashboard or account settings section. The process generally involves the following steps:

  1. Sign Up/Log In: Navigate to the SkyBiometry homepage and either sign up for a new account or log in to an existing one.
  2. Access Dashboard: Once logged in, locate your developer dashboard or an equivalent section, often labeled "API Keys," "Settings," or "My Account."
  3. Generate/Retrieve Keys: Within this section, your unique api_key and api_secret should be displayed. In some cases, you may need to explicitly generate a new key pair if it's your first time accessing this feature or if you wish to revoke an old key and create a new one for security reasons.
  4. Record Credentials: Carefully record both the api_key and api_secret. It is crucial to treat the api_secret with the same level of confidentiality as a password.

SkyBiometry provides a comprehensive documentation portal that guides users through the account setup and credential retrieval process. The free tier, which offers 1000 detections per month, utilizes the same API key authentication method, allowing developers to test and integrate the service without immediate financial commitment. It is advisable to review the official SkyBiometry documentation for the most up-to-date and specific instructions on credential management.

Authenticated request example

Authenticated requests to the SkyBiometry API involve including your api_key and api_secret as parameters in the request body or query string, depending on the specific endpoint and HTTP method. While SkyBiometry provides SDKs for various languages, a direct HTTP request example illustrates the underlying mechanism. Below is a conceptual example using curl to demonstrate how to make an authenticated request for face detection, assuming you have an image URL:

curl -X POST \
  'https://api.skybiometry.com/fc/faces/detect' \
  -d 'api_key=YOUR_API_KEY' \
  -d 'api_secret=YOUR_API_SECRET' \
  -d 'urls=https://example.com/path/to/your/image.jpg' \
  -H 'Content-Type: application/x-www-form-urlencoded'

In this example:

  • -X POST specifies the HTTP POST method.
  • 'https://api.skybiometry.com/fc/faces/detect' is the endpoint for face detection.
  • -d 'api_key=YOUR_API_KEY' and -d 'api_secret=YOUR_API_SECRET' are the authentication credentials passed as form data.
  • -d 'urls=https://example.com/path/to/your/image.jpg' is the parameter specifying the image to be analyzed.
  • -H 'Content-Type: application/x-www-form-urlencoded' sets the content type, indicating that the data is URL-encoded form data.

When using one of the SkyBiometry SDKs, the process simplifies. For instance, in Python, an authenticated request might look like this:

from SkyBiometry import Faces

# Replace with your actual API Key and Secret
api_key = 'YOUR_API_KEY'
api_secret = 'YOUR_API_SECRET'

# Initialize the Faces API client
faces = Faces.Faces(api_key, api_secret)

# Make a face detection call
result = faces.detect(urls='https://example.com/path/to/your/image.jpg')

# Print the result
print(result)

This Python example demonstrates how the SDK handles the underlying HTTP request and credential inclusion, allowing developers to focus on integrating the facial recognition logic. The SDKs manage the secure transmission of credentials over HTTPS, abstracting the raw HTTP request details. For specific SDK usage and more detailed examples, refer to the SkyBiometry API reference documentation.

Security best practices

Securing your SkyBiometry API keys and ensuring the integrity of your API interactions is crucial. Adhering to security best practices can mitigate risks such as unauthorized access, data breaches, and service abuse. These practices align with general API security guidelines recommended by organizations like the Internet Engineering Task Force (IETF) for credential management.

  1. Never Hardcode API Keys: Avoid embedding your api_key and api_secret directly into your source code, especially for client-side applications. Hardcoded credentials can be easily discovered through reverse engineering or by examining publicly accessible code repositories.
  2. Use Environment Variables: For server-side applications, store API keys as environment variables. This keeps them separate from your codebase and allows for easier management and rotation without code changes.
  3. Utilize Secret Management Services: For production environments, consider using dedicated secret management services like AWS Secrets Manager, Google Cloud Secret Manager, or HashiCorp Vault. These services provide secure storage, access control, and rotation capabilities for sensitive credentials.
  4. Implement Backend Proxy: If your application has a client-side component (e.g., a web or mobile app), route all SkyBiometry API calls through a secure backend proxy server. The client application communicates with your backend, which then makes the authenticated call to SkyBiometry using its securely stored keys. This prevents exposing your keys directly to the client.
  5. Restrict API Key Permissions (if available): While SkyBiometry's current API key model grants broad access, if future iterations or other APIs offer granular permissions, always configure keys with the minimum necessary privileges (principle of least privilege).
  6. Regularly Rotate API Keys: Periodically rotate your API keys. If a key is compromised, rotating it limits the window of potential abuse. SkyBiometry's dashboard typically offers functionality to generate new keys and revoke old ones.
  7. Monitor API Usage: Regularly monitor your SkyBiometry API usage for any unusual patterns or spikes that might indicate unauthorized activity. Set up alerts for unexpected usage levels.
  8. Enforce HTTPS: Always ensure that all communication with the SkyBiometry API is performed over HTTPS. SkyBiometry enforces this, but it's a fundamental security practice for any API interaction to encrypt data in transit and protect credentials from interception.
  9. Secure Your Development Environment: Protect your development machines and build pipelines. Ensure that credentials used during development are handled securely and not accidentally leaked into version control or public logs.

By implementing these best practices, developers can significantly enhance the security posture of applications integrating with SkyBiometry's facial recognition services, protecting both their own systems and user data.