Class ApplicationGrantsApi

java.lang.Object
com.okta.sdk.resource.api.ApplicationGrantsApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.0") public class ApplicationGrantsApi extends Object
  • Constructor Details

    • ApplicationGrantsApi

      public ApplicationGrantsApi()
    • ApplicationGrantsApi

      public ApplicationGrantsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getScopeConsentGrant

      public OAuth2ScopeConsentGrant getScopeConsentGrant(String appId, String grantId, String expand) throws ApiException
      Retrieve an app grant Retrieves a single scope consent Grant object for the app
      Parameters:
      appId - Application ID (required)
      grantId - Grant ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • getScopeConsentGrant

      public OAuth2ScopeConsentGrant getScopeConsentGrant(String appId, String grantId, String expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an app grant Retrieves a single scope consent Grant object for the app
      Parameters:
      appId - Application ID (required)
      grantId - Grant ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • grantConsentToScope

      public OAuth2ScopeConsentGrant grantConsentToScope(String appId, OAuth2ScopeConsentGrant oAuth2ScopeConsentGrant) throws ApiException
      Grant consent to scope Grants consent for the app to request an OAuth 2.0 Okta scope
      Parameters:
      appId - Application ID (required)
      oAuth2ScopeConsentGrant - (required)
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • grantConsentToScope

      public OAuth2ScopeConsentGrant grantConsentToScope(String appId, OAuth2ScopeConsentGrant oAuth2ScopeConsentGrant, Map<String,String> additionalHeaders) throws ApiException
      Grant consent to scope Grants consent for the app to request an OAuth 2.0 Okta scope
      Parameters:
      appId - Application ID (required)
      oAuth2ScopeConsentGrant - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      OAuth2ScopeConsentGrant
      Throws:
      ApiException - if fails to make API call
    • listScopeConsentGrants

      public List<OAuth2ScopeConsentGrant> listScopeConsentGrants(String appId, String expand) throws ApiException
      List all app grants Lists all scope consent Grants for the app
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • listScopeConsentGrants

      public List<OAuth2ScopeConsentGrant> listScopeConsentGrants(String appId, String expand, Map<String,String> additionalHeaders) throws ApiException
      List all app grants Lists all scope consent Grants for the app
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<OAuth2ScopeConsentGrant>
      Throws:
      ApiException - if fails to make API call
    • listScopeConsentGrantsPaged

      public Iterable<OAuth2ScopeConsentGrant> listScopeConsentGrantsPaged(String appId, String expand)
      List all app grants (Paginated) Lists all scope consent Grants for the app This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      Returns:
      Iterable<OAuth2ScopeConsentGrant> lazy iterable over all pages
    • listScopeConsentGrantsPaged

      public Iterable<OAuth2ScopeConsentGrant> listScopeConsentGrantsPaged(String appId, String expand, Map<String,String> additionalHeaders)
      List all app grants (Paginated with additional headers) Lists all scope consent Grants for the app This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      appId - Application ID (required)
      expand - An optional parameter to return scope details in the `_embedded` property. Valid value: `scope` (optional)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<OAuth2ScopeConsentGrant> lazy iterable over all pages
    • revokeScopeConsentGrant

      public void revokeScopeConsentGrant(String appId, String grantId) throws ApiException
      Revoke an app grant Revokes permission for the app to grant the given scope
      Parameters:
      appId - Application ID (required)
      grantId - Grant ID (required)
      Throws:
      ApiException - if fails to make API call
    • revokeScopeConsentGrant

      public void revokeScopeConsentGrant(String appId, String grantId, Map<String,String> additionalHeaders) throws ApiException
      Revoke an app grant Revokes permission for the app to grant the given scope
      Parameters:
      appId - Application ID (required)
      grantId - Grant ID (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()