Hello,
I’m trying to get started with the Trial Version of Confluent cloud and I am unable to connect to the API.
Listed below is the C# code:
var settings = {
“method”: “GET”,
“timeout”: 0,
“headers”: {
“Authorization”: “Basic NU1GSlpYNzVRVlNFWFBXWDpoY1oxVjlHQ1JiZlpXQnJxdEJZSmlxU2pZM0JLSVZZeERzUXcyM0Y0Y3o0OXl3VkQrNjdDMFNDTERpMTRjbUtD”,
“Content-Type”: “application/json”
},
“data”: JSON.stringify ({
“data”: “test connection”
}),
};
$.ajax(settings).done(function (response) {
console.log (response);
});
This is the API response:
{
“errors”: [
{
“id”: “488a2db7b810ffebe24189a4c2ee7ad9”,
“status”: “401”,
“detail”: “invalid API key: make sure you’re using a Cloud API Key and not a Cluster API Key: Confluent Cloud API Reference Documentation”,
“source”: {}
}
]
}