Skip to main content

Install

Or with uv:

Requirements

  • Python >= 3.10
  • Dependency: requests>=2.28.0

Quick start

API overview

status options: unused, used, disabled, expired.

Usage details

Pagination and filters

Verify result and error_code

When the API does not raise, verify uses success and error_code:
Common error_code: CODE_ALREADY_USED, CODE_NOT_FOUND, CODE_DISABLED, CODE_EXPIRED, etc.

Retry and resilience

Retry a limited number of times on 5xx or network errors:

Custom requests and generate_signature

For your own HTTP client, use generate_signature to build the signature:

Error handling

  • 4xx/5xx: Client raises requests.HTTPError; use e.response.status_code (e.g. 401, 403, 404, 429).
  • Business failure: When verify/reactivate returns success=False, use result['error_code'] for the reason.

Install from build

Install from local build (e.g. for development):

Run examples

Set CODEGATE_API_KEY, CODEGATE_SECRET, CODEGATE_PROJECT_ID, CODEGATE_BASE_URL (optional) first.

Development

Build

Tests