Influx 2.2 OSS, write DB error unauthorized access

Hi,

I am getting this error after initializing telegraf for my OSS version
ashokd@nextgenmonitoring:/etc/telegraf$ sudo telegraf --config-directory /etc/telegraf/telegraf.d
2020-11-27T03:21:04Z I! Starting Telegraf 1.16.2
2020-11-27T03:21:04Z I! Using config file: /etc/telegraf/telegraf.conf
2020-11-27T03:21:04Z I! Loaded inputs: cpu disk diskio exec mem net processes swap system
2020-11-27T03:21:04Z I! Loaded aggregators:
2020-11-27T03:21:04Z I! Loaded processors:
2020-11-27T03:21:04Z I! Loaded outputs: influxdb_v2
2020-11-27T03:21:04Z I! Tags enabled: host=nextgenmonitoring
2020-11-27T03:21:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“nextgenmonitoring”, Flush Interval:10s
2020-11-27T03:21:14Z E! [outputs.influxdb_v2] when writing to [http://172.24.3.240:8086]: failed to write metric: unauthorized: unauthorized access

issue got resolved after updating the token, can be closed,