Unauthorized access when I try to write datas

Hi, I write data with a token is pretty well.
When I switch to username / password, I got unauthorized access event.

language : c#
_client = InfluxDBClientFactory.Create(url, _token.ToCharArray());
_client = InfluxDBClientFactory.Create(url, _user, _password.ToCharArray());

the API token is created for the user by the web UI.

OSS v2.0.7 / v2.4.0

Hi @Erikson,

thanks for using our client.

The preferred way to authorise is the token. Are you able to simulate your authorisation error?

Regards

Hi @bednar,

  thanks , and I will follow the way.

  Test case :

  .... passed
  _client = InfluxDBClientFactory.Create(url, _user, _password.ToCharArray());
  var theAPI = _client.GetWriteApi(writeOptions);
  theAPI.EventHandler += ShowWriteEvent;
  
  ... when I try to write data
  theAPI.WritePoint(_point, _bucket, _org);

  .... I got error event (unauthorized access)