I can't sent topic to InfluxDB with MQTT HiveMQ

I’m using InfluxDB V2.0, and wanted to parsing MQTT metrics to influxb cloud. But it always error
E! error loading config file retry 3 of 3 failed to retrieve remote config: 401 Unauthorized

In most cases a 401 error means your credentials are invalid and hence unauthorized.

I dont understand, i used the exact API and login to influxdb using the same credential

InfluxDB v2 does not use username and passwords to retrieve data. Rather it uses tokens. Do you have the INFLUX_TOKEN variable exported?

I do have the token API and still got the same error

@irene_silva are you 100% sure you exported the token to the Telegraf process, i.e. correct user, correct spelling of the environment variable, export for child processes etc? It reads like you are trying to read the config from a remote location but do not export the InfluxDB token correctly…