Skip to main content

API Clients

Library​

Official​

The Authzed team officially supports and maintains client libraries for a variety of languages. Officially maintained client libraries can be found on the authzed GitHub organization.

Official clients typically leverage their language's gRPC libraries to provide a client abstraction for each version of the API. For example, in Go, constructing a client is no different from creating any other gRPC connection and can use any gRPC DialOption to configure advanced functionality such as proxying, retries, and more.

Third Party​

Any developer can generate their own clients from the published Protobuf Definitions. Regardless of language, we recommend using the buf toolchain to manage the generation workflow.

We recommend GitHub users to tag their repositories with authzed-client and spicedb-client to help withdiscovery.

If you are interested in additional language or building your own, feel free to jump into Discord to share and collaborate with other developers.

Command Line​

zed​

zed is the official command-line tool for managing Authzed and SpiceDB.

Once configured with credentials, zed usage looks like:

$ zed schema read
definition user {}

definition document {
relation writer: user
relation reader: user

permission edit = writer
permission view = reader + edit
}

$ zed permission check document:firstdoc writer user:emilia
false

$ zed relationship create document:firstdoc writer user:emilia
CAESAggB

$ zed permission check document:firstdoc writer user:emilia
true

grpcurl​

grpcurl is a generic gRPC client that should feel familiar to users of curl. It uses JSON representations of Protocol Buffers to specify messages.

We recommend this client over grpc_cli for generic gRPC interactions.

Example usage:

noglob grpcurl -rpc-header "authorization: Bearer myapikey" -d '{"schema": "definition user {}"}' grpc.authzed.com:50051 "authzed.api.v1.SchemaService/WriteSchema"

grpc_cli​

grpc_cli is the official generic gRPC client and is sometimes installed with gRPC itself. Despite that, it is relatively immature and not deemed stable by the gRPC team.

Because of this and the user experience being worse than grpcurl, we do not recommend it.

curl​

Users running SpiceDB with HTTP enabled, are able to use curl with a JSON API.

Example usage:

curl -H "Authorization: Bearer myapikey" -X POST localhost:443/v1/schema/read