Skip to main content
The official Go SDK (github.com/playcamp/playcamp-go-sdk) provides a type-safe way to integrate with the PlayCamp API. It handles authentication, pagination, retries, and error handling with zero external dependencies.

Installation

Requirements: Go >= 1.21

Quick Start

Client vs Server

The SDK provides two constructors depending on your API key type:
Never use NewServer or expose your Server Key on the client side.

Client Resources

Server Resources

Configuration

Environments

You can also specify a custom URL directly:

Pointer Helpers

Use built-in helpers for optional fields:

Pagination

List endpoints return paginated results:
Use the iterator to automatically page through all results:

Error Handling

The SDK returns typed errors for different scenarios:

Webhook Verification

The SDK provides the webhookutil package for verifying incoming webhook signatures:
For testing, you can generate signatures locally:
See the Webhook Events page for more details on webhook event types and payloads.

Example Project

For a complete working example with all API endpoints, see the playcamp-go-sdk-example repository.