Influx Cloud Compatibility with C# Client Library

I just started a free Influx Cloud db and am looking to connect to it via the c# client library that Influx offers. In the past I have connected to this API using Influx OSS versions and have had no issues. However I cannot seem to connect to the cloud version of influx through the c# API. Is there any documentation specific for connecting to client libraries with the cloud version of influx?

It seems there quite a few differences between the cloud and oss version of influx. When I pass a flux query just requesting the buckets I have on my Influx db, I get a http 405 error, which typically means the server knows what I’m asking for, but is not able to give it to me (can these endpoints be enabled??). I also do not have access to the ping or health endpoints. What endpoints are enabled/disabled on the cloud version of influx? Is the cloud version supposed to be compatible with the C# client library? The documentation for the client library just states version 2.x is compatible, does that include the cloud version? If it is compatible, is there any documentation for how to read data and query using flux?

any information regarding Influx Cloud and the C# client library would be greatly appreciated.

Hi @ticchioned,

thanks for using our client.

No, it should seamlessly works as with OSS.

Try to generate new token with permission ALL.



You can try something like:

using System;
using System.Linq;
using System.Threading.Tasks;
using InfluxDB.Client;

namespace Examples
    public class InfluxDBCloudExample
        private const string Url = "";
        private const string Token = "my-token";
        private const string Org = "my-org";
        public static async Task Main(string[] args)
            using var client = InfluxDBClientFactory.Create(Url, Token);

            var connectable = await client.PingAsync();
            Console.WriteLine($"Is connected: {connectable}");

            var version = await client.VersionAsync();
            Console.WriteLine($"Cloud version: {version}");

            var tables = await client.GetQueryApi().QueryAsync("buckets()", org: Org);
            foreach (var record in tables.SelectMany(table => table.Records))
                Console.WriteLine($"bucket: {record.GetValueByKey("name")}");


I didn’t realize I needed to take the org ID out of the URL. Everything is working as expected! Thank you