You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the connection via builder.authenticateToken(token.toCharArray()); works.
If the connection is made via builder.authenticate(username, password.toCharArray()); --> error message
influx HTTP status code: 401; message: Unauthorized access
The text was updated successfully, but these errors were encountered:
Thank you for your answer and the reference to the example.
In the example is a different error.
I do it exactly as recommended in the example in an answer. It also works with use of the token, but not with the username and password, although it has been ensured that these are correct.
annikaImBuero
changed the title
influx HTTP status code: 401; Message: Unauthorized access.
Java client library: finfluxdb client | influx HTTP status code: 401; Message: Unauthorized access. https://github.com/influxdata/influxdb-java
Mar 31, 2023
annikaImBuero
changed the title
Java client library: finfluxdb client | influx HTTP status code: 401; Message: Unauthorized access. https://github.com/influxdata/influxdb-java
Java client library: finfluxdb client | influx HTTP status code: 401; Message: Unauthorized access.
Mar 31, 2023
Java client library: influxdb client
https://github.com/influxdata/influxdb-client-java
Builder builder = InfluxDBClientOptions.builder();
builder.url(serverUrl);
if (!token.isEmpty()) {
builder.authenticateToken(token.toCharArray()); // 1.
} else {
builder.authenticate(username, password.toCharArray()); // 2.
}
builder.bucket(bucketName);
builder.org(organization);
InfluxDBClientOptions options = builder.build();
influx HTTP status code: 401; message: Unauthorized access
The text was updated successfully, but these errors were encountered: