The authentication endpoints.
- authenticate - Authenticate with the API by providing a username and password.
Authenticate with the API by providing a username and password.
package hello.world;
import java.lang.Exception;
import to.unified.unified_java_sdk.UnifiedTo;
import to.unified.unified_java_sdk.models.errors.APIError;
import to.unified.unified_java_sdk.models.operations.AuthenticateRequestBody;
import to.unified.unified_java_sdk.models.operations.AuthenticateResponse;
public class Application {
public static void main(String[] args) throws APIError, Exception {
UnifiedTo sdk = UnifiedTo.builder()
.build();
AuthenticateRequestBody req = AuthenticateRequestBody.builder()
.build();
AuthenticateResponse res = sdk.authentication().authenticate()
.request(req)
.call();
if (res.object().isPresent()) {
System.out.println(res.object().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
AuthenticateRequestBody | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/APIError | 5XX | application/json |
| models/errors/SDKError | 4XX | */* |