Authentication methods for the iiniit API

To securely access iiniit API endpoints, your application must authenticate using one of the supported methods.

🔐 Authentication Methods for the iiniit API

To securely access iiniit API endpoints, your application must authenticate using one of the supported methods. Proper authentication ensures that only authorized clients can interact with iiniit services.


Overview

iiniit supports the following authentication methods for API access:

  • API Key Authentication

  • OAuth 2.0 Bearer Token Authentication


1. API Key Authentication

What It Is

A simple method where your API key is sent with each request to identify and authorize your application.

How to Use

  • Include your API key in the HTTP header of your request:

    makefile
    Authorization: ApiKey YOUR_API_KEY_HERE
  • Alternatively, you can send the API key as a query parameter:

    arduino
    https://api.iiniit.com/resource?api_key=YOUR_API_KEY_HERE

When to Use

Best for server-to-server communication and simple integration scenarios.


2. OAuth 2.0 Bearer Token Authentication

What It Is

A more secure, token-based authentication standard commonly used for delegated access and user-level permissions.

How to Use

  • Obtain an access token via the OAuth 2.0 authorization flow.

  • Include the access token in your API requests as a Bearer token:

    makefile
    Authorization: Bearer YOUR_ACCESS_TOKEN_HERE

When to Use

Ideal for applications that need to act on behalf of users or require granular permission scopes.


Authentication Flow Summary

Method Use Case How to Send
API Key Server-to-server, simple access Authorization: ApiKey <key> or ?api_key=
OAuth 2.0 Bearer User-delegated, granular scopes Authorization: Bearer <token>

Security Best Practices

  • Always keep your API keys and tokens confidential.

  • Use HTTPS for all API requests to encrypt communication.

  • Rotate your API keys and tokens regularly.

  • Revoke any compromised credentials immediately.

  • Use OAuth scopes to limit permissions when possible.

Was this article helpful?