Package video.api.client.api.clients
Class AuthenticationApi
- java.lang.Object
-
- video.api.client.api.clients.AuthenticationApi
-
public class AuthenticationApi extends Object
-
-
Constructor Summary
Constructors Constructor Description AuthenticationApi()Constructor for AuthenticationApi production environment where API key is not required.AuthenticationApi(String basePath)Constructor for AuthenticationApi with custom API base path where API key is not required.AuthenticationApi(String apiKey, String basePath)Constructor for AuthenticationApi with custom API base pathAuthenticationApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessTokenauthenticate(AuthenticatePayload authenticatePayload)Authenticate To get started, submit your API key in the body of your request.ApiResponse<AccessToken>authenticateWithHttpInfo(AuthenticatePayload authenticatePayload)Authenticate To get started, submit your API key in the body of your request.ApiClientgetApiClient()AccessTokenrefresh(RefreshTokenPayload refreshTokenPayload)Refresh token Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint.ApiResponse<AccessToken>refreshWithHttpInfo(RefreshTokenPayload refreshTokenPayload)Refresh token Use the refresh endpoint with the refresh token you received when you first authenticated using the api-key endpoint.voidsetApiClient(ApiClient apiClient)
-
-
-
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 APIbasePath- 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 -
-
-