Skip to main content
Clients authenticate requests to Confidence from your website, backend service, or mobile app.
Clients are different from API clients. Use Clients in your application to talk to Confidence to resolve flags or publish events. API clients talk to Confidence’s management APIs, for tasks like creating new flags or managing rules.

Client Credentials

After you have created a client, you also need to create a client secret that you use to authenticate requests to Confidence. Use the client secret when you initialize a Confidence client SDK, or when you make API requests to Confidence.

Credential Rotation

For security purposes, you may need to rotate credentials periodically. The process involves creating a new credential, updating your application to use it, and then deleting the old credential.

Environments

Environments let you separate flag behavior across different deployment stages like development, staging, and production. You can use the same client across multiple environments while configuring different credentials for each environment.

How Environments Work

Environments work through two configuration points:
  1. Client credentials: You can associate each credential with specific environments. When you link a credential to an environment, the credential identifies which environment the resolve request comes from.
  2. Flag rules: You can limit each rule to specific environments. Rules without environment restrictions apply to all environments.
When a client resolves flags, Confidence checks which environment the credential belongs to, then evaluates only the rules that apply to that environment.

Associate Credentials with Environments

When creating a client credential, you can specify which environments the credential applies to. A credential without environments only matches rules that also have no environments specified.
Rule EnvironmentsCredential EnvironmentsRule Enabled
EmptyEmptyYes
EmptyHas valuesYes
Has valuesEmptyNo
Has valuesHas matching valueYes
Has valuesNo matching valueNo
This approach allows you to reuse a single client across environments. Create separate credentials for each environment so that flags resolve based on the environment of the requesting credential.
1

Go to the Clients page

Navigate to Clients in the Admin section.
2

Select the client

Select the client to show its credentials.
3

Open credential options

Click the more options icon in the top-right corner of the credential.
4

Edit environments

Select Edit environments and enable the environments you want for this credential.
5

Configure flag rules

Configure your flag rules to apply only to specific environments in the rule creation flow.