SpiceDB Documentation
Getting Started
Client Libraries

Official Client Libraries

SpiceDB is primarily accessed by a gRPC (opens in a new tab) API and thus client libraries can be generated for any programming language.

AuthZed builds and maintains gRPC client libraries for the following languages:

Because the above libraries are generated from protobuf definitions in our API repo (opens in a new tab), the primary documentation for the gRPC API is in the buf documentation (opens in a new tab) for SpiceDB's services. The gRPC client documentation associated with each host language will also be helpful for putting together invocations. Additionally, there are example directories in the client libraries that provide example usages.

HTTP Clients

SpiceDB exposes an HTTP API when run with the --http-enabled flag. While Authzed doesn't officially maintain HTTP client libraries, there are OpenAPI (opens in a new tab) docs available both in the authzed-go git repo (opens in a new tab) and served by a SpiceDB instance running the HTTP server. For example:

docker run --rm -p 50051:50051 -p 8443:8443 authzed/spicedb serve --http-enabled --grpc-preshared-key <preshared key>
 
curl localhost:8443/openapi.json

The OpenAPI JSON can then be converted into a client using a tool like openapi-ts (opens in a new tab) or openapi-python-client (opens in a new tab).

Other Clients

AuthZed also develops zed (opens in a new tab), a command-line client for interacting with the SpiceDB API.

You can find more languages and integrations maintained by the community in the Clients section (opens in a new tab) of the Awesome SpiceDB (opens in a new tab) repository.

© 2024 AuthZed.