Okta.Sdk.Api.PushProviderApi

October 22, 2025 ยท View on GitHub

All URIs are relative to https://subdomain.okta.com

MethodHTTP requestDescription
CreatePushProviderPOST /api/v1/push-providersCreate a push provider
DeletePushProviderDELETE /api/v1/push-providers/{pushProviderId}Delete a push provider
GetPushProviderGET /api/v1/push-providers/{pushProviderId}Retrieve a push provider
ListPushProvidersGET /api/v1/push-providersList all push providers
ReplacePushProviderPUT /api/v1/push-providers/{pushProviderId}Replace a push provider

CreatePushProvider

PushProvider CreatePushProvider (PushProvider pushProvider)

Create a push provider

Creates a new push provider. Each Push Provider must have a unique name.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class CreatePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProvider = new PushProvider(); // PushProvider | 

            try
            {
                // Create a push provider
                PushProvider result = apiInstance.CreatePushProvider(pushProvider);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.CreatePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
pushProviderPushProvider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
400Bad Request-
403Forbidden-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeletePushProvider

void DeletePushProvider (string pushProviderId)

Delete a push provider

Deletes a push provider by pushProviderId. If the push provider is currently being used in the org by a custom authenticator, the delete will not be allowed.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class DeletePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider

            try
            {
                // Delete a push provider
                apiInstance.DeletePushProvider(pushProviderId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.DeletePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
pushProviderIdstringId of the push provider

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
204No Content-
403Forbidden-
404Not Found-
409Conflict-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetPushProvider

PushProvider GetPushProvider (string pushProviderId)

Retrieve a push provider

Retrieves a push provider by pushProviderId

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class GetPushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider

            try
            {
                // Retrieve a push provider
                PushProvider result = apiInstance.GetPushProvider(pushProviderId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.GetPushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
pushProviderIdstringId of the push provider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ListPushProviders

List<PushProvider> ListPushProviders (ProviderType? type = null)

List all push providers

Lists all push providers

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ListPushProvidersExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var type = (ProviderType) "APNS";  // ProviderType? | Filters push providers by `providerType` (optional) 

            try
            {
                // List all push providers
                List<PushProvider> result = apiInstance.ListPushProviders(type).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.ListPushProviders: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
typeProviderType?Filters push providers by `providerType`[optional]

Return type

List<PushProvider>

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
403Forbidden-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ReplacePushProvider

PushProvider ReplacePushProvider (string pushProviderId, PushProvider pushProvider)

Replace a push provider

Replaces a push provider by pushProviderId

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ReplacePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider
            var pushProvider = new PushProvider(); // PushProvider | 

            try
            {
                // Replace a push provider
                PushProvider result = apiInstance.ReplacePushProvider(pushProviderId, pushProvider);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.ReplacePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
pushProviderIdstringId of the push provider
pushProviderPushProvider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200OK-
400Bad Request-
403Forbidden-
404Not Found-
429Too Many Requests-

[Back to top] [Back to API list] [Back to Model list] [Back to README]