Error 401 using KafkaIO to access to schema registry

Hello, i’m trying to connect to the schema registry using KafkaIO, but i receive this error: Unauthorized; error code: 401

props.put("schema.registry.url", "https://schema_registry_url");
props.put("basic.auth.credentials.source", "USER_INFO");
props.put("", "KEY:PASSWORD");

   PCollection<KV<String, String>> entries =
                                "Read Entries from Confluent Cloud Topic",
                                KafkaIO.<String, String>read()
                                        .withValueDeserializer(ConfluentSchemaRegistryDeserializerProvider.of(SCHEMA_URL, TOPIC))

Welcome to the forum!

Assuming that you are using “https://schema_registry_url”. and “KEY:PASSWORD” as placeholders for the real values, have you verified that the values you are using for key and password are the correct ones for the schema registry URL that you are trying to access?

1 Like