Can we write InfluxQL in Influxdb 2.0 and above using @influxdata/influxdb-client or influx dependencies in NodeJs? If yes How?

const influx = new Influx.InfluxDB({
host: ‘localhost’,
database: ‘database’,
port: 8086,

.then(names => {

I’m getting error for running the above query in influxdb 2.2 :
Error: A 401 Unauthorized error occurred: {“code”:“unauthorized”,“message”:“Unauthorized”}

Hi @Nik,
Welcome to the community :slight_smile: . Please make sure you have mapped your buckets first to a DB and then make sure you include the authorisation requirements: Query data with InfluxQL | InfluxDB OSS 2.3 Documentation

Please give legitimate answers… I have mapped the buckets to DB

i don’t want baseless statements

@ Jay_Clifford or any others