Skip to main content

Overview

Complete guide to using the Unkey Go SDK for issuing keys, verifying requests, and rate limiting in your Go applications and services.
1 min read

The unkey-go SDK provides full access to Unkey's API for managing keys, verifying requests, and rate limiting.

Installation#

Quick Start#

Initialize the client#

Warning

Never expose your root key in client-side code or commit it to version control.


Verify an API Key#

Check if a user's API key is valid:

HTTP middleware example#

Gin middleware example#


Create API Keys#

Issue new keys for your users:

Warning

The full API key is only returned once at creation. Unkey stores only a hash.


Update Keys#

Modify an existing key:


Delete Keys#

Permanently revoke a key:


Rate Limiting#

Use the rate limit API directly:


Error Handling#


Full Reference#

GitHub

Complete auto-generated API reference