Class AuthenticationApi


  • public class AuthenticationApi
    extends Object
    • Constructor Detail

      • AuthenticationApi

        public AuthenticationApi​(ApiClient apiClient)
      • AuthenticationApi

        public AuthenticationApi()
        Constructor for AuthenticationApi production environment where API key is not required.
      • AuthenticationApi

        public AuthenticationApi​(String basePath)
        Constructor for AuthenticationApi with custom API base path where API key is not required.
        Parameters:
        basePath - the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
      • AuthenticationApi

        public AuthenticationApi​(String apiKey,
                                 String basePath)
        Constructor for AuthenticationApi with custom API base path
        Parameters:
        apiKey - the api key to use to authenticate to the API
        basePath - the api base path. Expected Environment.PRODUCTION.basePath (default) or Environment.SANDBOX.basePath.
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • authenticate

        public AccessToken authenticate​(AuthenticatePayload authenticatePayload)
                                 throws ApiException
        Authenticate To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication. All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate)
        Parameters:
        authenticatePayload - (required)
        Returns:
        AccessToken
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad Request -
      • authenticateWithHttpInfo

        public ApiResponse<AccessToken> authenticateWithHttpInfo​(AuthenticatePayload authenticatePayload)
                                                          throws ApiException
        Authenticate To get started, submit your API key in the body of your request. api.video returns an access token that is valid for one hour (3600 seconds). A refresh token is also returned. View a [tutorial](https://api.video/blog/tutorials/authentication-tutorial) on authentication. All tutorials using the [authentication endpoint](https://api.video/blog/endpoints/authenticate)
        Parameters:
        authenticatePayload - (required)
        Returns:
        ApiResponse<AccessToken>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad Request -
      • refresh

        public AccessToken refresh​(RefreshTokenPayload refreshTokenPayload)
                            throws ApiException
        Refresh token Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token.
        Parameters:
        refreshTokenPayload - (required)
        Returns:
        AccessToken
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad Request -
      • refreshWithHttpInfo

        public ApiResponse<AccessToken> refreshWithHttpInfo​(RefreshTokenPayload refreshTokenPayload)
                                                     throws ApiException
        Refresh token Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint. Send the refresh token in the body of your request. The api.video API returns a new access token that is valid for one hour (3600 seconds) and a new refresh token.
        Parameters:
        refreshTokenPayload - (required)
        Returns:
        ApiResponse<AccessToken>
        Throws:
        ApiException - If fail to call the API, e.g. server error or cannot deserialize the response body
        Http Response Details:
        Status Code Description Response Headers
        200 Success -
        400 Bad Request -