Get a Kafka cluster's credentials

Get the SCRAM credentials of the cluster's default user and the client settings to connect with. You can get them at any time.

GET https://{availability_zone}.betterstackcloud.com/v1/kafka/{id}/credentials
id string required

The ID of the Kafka cluster.

Authorization string required

Bearer $TOKEN

200 OK
{
  "username": "example",
  "password": "example",
  "bootstrap_servers": "example",
  "public_bootstrap_servers": "example",
  "security_protocol": "example",
  "sasl_mechanism": "example",
  "ca_certificate": "example",
  "properties": {
    "bootstrap.servers": "example",
    "security.protocol": "example",
    "sasl.mechanism": "example",
    "sasl.username": "example",
    "sasl.password": "example",
    "ssl.ca.location": "example"
  }
}

Returns the default user's credentials and the client settings as one object.

username string or null

The default user's username, or null when the cluster has no default user.

password string or null

The default user's SCRAM password, or null when the cluster has no default user.

bootstrap_servers string

The private bootstrap address, as host:port.

public_bootstrap_servers string

The public bootstrap address, as host:port. Present only when public_access is on.

security_protocol string

The protocol clients connect with, always SASL_SSL.

sasl_mechanism string

The authentication mechanism, always SCRAM-SHA-512.

ca_certificate string

The CA certificate bundle that signs the cluster's TLS certificate. Save it to a file for your client to verify the cluster.

properties object

The client settings to connect with, under the names librdkafka and kcat use. The settings include the password. Replace /path/to/betterstack-ca.pem in ssl.ca.location with the path of the saved ca_certificate.

properties.bootstrap.servers string

The bootstrap.servers.

properties.security.protocol string

The security.protocol.

properties.sasl.mechanism string

The sasl.mechanism.

properties.sasl.username string or null

The sasl.username.

properties.sasl.password string or null

The sasl.password.

properties.ssl.ca.location string

The ssl.ca.location.