Skip to main content
This article explains how to build an OpenFGA client by using the SDKs. The first step is to ensure that you have created a store by following these steps. Next, depending on the authentication scheme you want to use, there are different ways to build the client.

Using No Authentication

This is a simple setup but it is not recommended for production use.

Using shared key authentication

If you want to use shared key authentication, you need to generate a random string that will work as secret and set that key when building your OpenFGA server. Then, when building the client, set it as environment variable FGA_API_TOKEN.
If you are going to use this setup in production, you should enable TLS in your OpenFGA server. Please see the Running OpenFGA in Production.

Using client credentials flow

The OpenFGA server does not support the client credentials flow, however if you or your OpenFGA provider have implemented a client credentials wrapper on top, follow the instructions here to have the OpenFGA client handle the token exchange for you.
Last modified on September 28, 2026