---
name: bijection-api-keys-akshatsinha0
description: "Evaluate and integrate the Api Keys Akshatsinha0 component with Bijection."
---

# Api Keys Akshatsinha0

A Bijection api keys component for Bijection.

- Package: @bijectionhq/api-keys-akshatsinha0
- Category: Authentication
- Status: Reference
- License: Apache-2.0
- Bijection source (repository access required): https://github.com/bijectionhq/api-keys-akshatsinha0/tree/21ff297298cf673be5324a403c5b4514e74dfcd1
- Upstream: https://github.com/akshatsinha0/convex-api-keys/tree/8088f6c205e3a77aa33f625528ac16e96d46e0db
- Documentation: https://docs.bijection.com/components/using
- Directory: https://bijection.com/components/api-keys-akshatsinha0

## Get the source

Bijection repository access is required. Request access at https://bijection.com/contact.

```sh
git clone https://github.com/bijectionhq/api-keys-akshatsinha0.git
cd api-keys-akshatsinha0
git checkout 21ff297298cf673be5324a403c5b4514e74dfcd1
```

## Before using this component

Read the package README at the recorded revision for setup, dependencies, and API examples. Upstream documentation describes the original package and may differ from the Bijection adaptation. This is a source candidate for evaluation. Catalog inclusion does not establish npm availability or runtime qualification. Check compatibility with your SDK and deployment before adoption. External providers run their own compute.

## Integration workflow

1. Read the source README and package manifest at the recorded revision.
2. Confirm the required SDK, dependency availability, and runtime compatibility.
3. Follow the component's documented setup and configuration. Never invent an npm install command from a catalog package name.
4. Keep credentials in the project's existing secret store.
5. Follow the project's execution rules for verification and report what was actually checked.

## Original upstream skill

The following guidance describes @00akshatsinha00/convex-api-keys. Its installation commands and APIs refer to the upstream package. Evaluate compatibility with the Bijection source separately.


# convex-api-keys

## Instructions

Use convex-api-keys to native convex component for api key management with sha-256 hashing, rate limiting, rbac, usage credits, and audit logging within convex transactions. This Convex component integrates directly with your backend.

### Installation

```bash
npm install @00akshatsinha00/convex-api-keys
```

### Capabilities

- Eliminate external services for API key management by running everything inside Convex with transactional guarantees
- Build real-time dashboards with reactive queries that automatically update when API key usage changes
- Implement role-based access control with permissions, rate limiting, and usage credits without managing separate infrastructure
- Track API usage with automatic analytics rollups and audit logging for compliance requirements

## Examples

### how to add API key authentication to Convex app

Use convex-api-keys to create, verify, and manage API keys entirely within Convex. The component handles SHA-256 hashing, stores keys securely, and provides verification mutations that check validity, rate limits, and usage credits in a single atomic operation.

### implement rate limiting for API keys in Convex

The convex-api-keys component provides sliding window rate limiting with per-key and per-owner overrides. Configure limits during key creation and the verify mutation automatically enforces them with transactional consistency.

### API key role based access control Convex

Create permissions and roles, then assign them to API keys using the component's RBAC system. The verify mutation returns permissions, and you can use hasPermission() to check authorization for specific endpoints or actions.

### track API usage analytics in Convex

The component automatically logs all verification attempts and creates hourly/daily analytics rollups. Query usage stats, top keys by usage, and build reactive dashboards that update in real-time as API calls are made.

## When NOT to use

- When a simpler built-in solution exists for your specific use case
- If you are not using Convex as your backend
- When the functionality provided by convex-api-keys is not needed

## Troubleshooting

**How does convex-api-keys store API keys securely?**

The convex-api-keys component uses SHA-256 hashing to store keys, meaning plaintext keys never persist in the database. Only the hashed version is stored, and the component generates cryptographically secure keys with configurable entropy using base62 encoding.

**Can I use this component for SaaS tiered pricing with usage limits?**

Yes, convex-api-keys supports usage credits with automatic refill intervals (hourly, daily, weekly, monthly). You can configure different credit amounts for different pricing tiers and the verify mutation automatically decrements credits while enforcing limits.

**Does the component work with multi-tenant applications?**

Yes, convex-api-keys supports multi-tenancy through namespaces and owner isolation. Each key has an ownerId and optional namespace, allowing you to segregate keys by customer, organization, or environment while maintaining data isolation.

**How do I rotate API keys without downtime?**

The convex-api-keys component provides key rotation with configurable grace periods. During rotation, both the old and new keys remain valid for the specified grace period, allowing clients to migrate without service interruption.

**What analytics and monitoring does this component provide?**

The component includes comprehensive audit logging, automatic analytics rollups with time-bucketed queries, usage statistics per key, and top keys ranking by usage. All data is reactive, so dashboards built with Convex queries update in real-time.

## Resources

- [npm package](https://www.npmjs.com/package/%4000akshatsinha00%2Fconvex-api-keys)
- [GitHub repository](https://github.com/akshatsinha0/convex-api-keys)
- [Convex Components Directory](https://www.convex.dev/components/00akshatsinha00/convex-api-keys)
- [Convex documentation](https://docs.convex.dev)