Skip to content

Latest commit

 

History

History
63 lines (42 loc) · 2.55 KB

File metadata and controls

63 lines (42 loc) · 2.55 KB

Authentication

Overview

The authentication endpoints.

Available Operations

  • authenticate - Authenticate with the API by providing a username and password.

authenticate

Authenticate with the API by providing a username and password.

Example Usage

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());
        }
    }
}

Parameters

Parameter Type Required Description
request AuthenticateRequestBody ✔️ The request object to use for the request.

Response

AuthenticateResponse

Errors

Error Type Status Code Content Type
models/errors/APIError 5XX application/json
models/errors/SDKError 4XX */*