Okta.Sdk.Api.AuthorizationServerClientsApi

October 22, 2025 ยท View on GitHub

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

MethodHTTP requestDescription
GetRefreshTokenForAuthorizationServerAndClientGET /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId}Retrieve a refresh token for a client
ListOAuth2ClientsForAuthorizationServerGET /api/v1/authorizationServers/{authServerId}/clientsList all client resources for an authorization server
ListRefreshTokensForAuthorizationServerAndClientGET /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokensList all refresh tokens for a client
RevokeRefreshTokenForAuthorizationServerAndClientDELETE /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId}Revoke a refresh token for a client
RevokeRefreshTokensForAuthorizationServerAndClientDELETE /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokensRevoke all refresh tokens for a client

GetRefreshTokenForAuthorizationServerAndClient

OAuth2RefreshToken GetRefreshTokenForAuthorizationServerAndClient (string authServerId, string clientId, string tokenId, string expand = null)

Retrieve a refresh token for a client

Retrieves a refresh token for a Client

Example

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

namespace Example
{
    public class GetRefreshTokenForAuthorizationServerAndClientExample
    {
        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 AuthorizationServerClientsApi(config);
            var authServerId = GeGRTEr7f3yu2n7grw22;  // string | `id` of the Authorization Server
            var clientId = 52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD;  // string | Client app ID
            var tokenId = sHHSth53yJAyNSTQKDJZ;  // string | `id` of Token
            var expand = "expand_example";  // string | Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional) 

            try
            {
                // Retrieve a refresh token for a client
                OAuth2RefreshToken result = apiInstance.GetRefreshTokenForAuthorizationServerAndClient(authServerId, clientId, tokenId, expand);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthorizationServerClientsApi.GetRefreshTokenForAuthorizationServerAndClient: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
authServerIdstring`id` of the Authorization Server
clientIdstringClient app ID
tokenIdstring`id` of Token
expandstringValid value: `scope`. If specified, scope details are included in the `_embedded` attribute.[optional]

Return type

OAuth2RefreshToken

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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

ListOAuth2ClientsForAuthorizationServer

List<OAuth2Client> ListOAuth2ClientsForAuthorizationServer (string authServerId)

List all client resources for an authorization server

Lists all client resources for which the specified authorization server has tokens. > Note: To list a specific user's client resources for which they have tokens or grants, use the List all clients endpoint in the User Resources API.

Example

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

namespace Example
{
    public class ListOAuth2ClientsForAuthorizationServerExample
    {
        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 AuthorizationServerClientsApi(config);
            var authServerId = GeGRTEr7f3yu2n7grw22;  // string | `id` of the Authorization Server

            try
            {
                // List all client resources for an authorization server
                List<OAuth2Client> result = apiInstance.ListOAuth2ClientsForAuthorizationServer(authServerId).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthorizationServerClientsApi.ListOAuth2ClientsForAuthorizationServer: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
authServerIdstring`id` of the Authorization Server

Return type

List<OAuth2Client>

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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

ListRefreshTokensForAuthorizationServerAndClient

List<OAuth2RefreshToken> ListRefreshTokensForAuthorizationServerAndClient (string authServerId, string clientId, string expand = null, string after = null, int? limit = null)

List all refresh tokens for a client

Lists all refresh tokens issued by an authorization server for a specific Client

Example

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

namespace Example
{
    public class ListRefreshTokensForAuthorizationServerAndClientExample
    {
        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 AuthorizationServerClientsApi(config);
            var authServerId = GeGRTEr7f3yu2n7grw22;  // string | `id` of the Authorization Server
            var clientId = 52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD;  // string | Client app ID
            var expand = "expand_example";  // string | Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. (optional) 
            var after = "after_example";  // string | Specifies the pagination cursor for the next page of tokens (optional) 
            var limit = -1;  // int? | The maximum number of tokens to return (maximum 200) (optional)  (default to -1)

            try
            {
                // List all refresh tokens for a client
                List<OAuth2RefreshToken> result = apiInstance.ListRefreshTokensForAuthorizationServerAndClient(authServerId, clientId, expand, after, limit).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthorizationServerClientsApi.ListRefreshTokensForAuthorizationServerAndClient: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
authServerIdstring`id` of the Authorization Server
clientIdstringClient app ID
expandstringValid value: `scope`. If specified, scope details are included in the `_embedded` attribute.[optional]
afterstringSpecifies the pagination cursor for the next page of tokens[optional]
limitint?The maximum number of tokens to return (maximum 200)[optional] [default to -1]

Return type

List<OAuth2RefreshToken>

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

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

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

RevokeRefreshTokenForAuthorizationServerAndClient

void RevokeRefreshTokenForAuthorizationServerAndClient (string authServerId, string clientId, string tokenId)

Revoke a refresh token for a client

Revokes a refresh token for a Client

Example

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

namespace Example
{
    public class RevokeRefreshTokenForAuthorizationServerAndClientExample
    {
        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 AuthorizationServerClientsApi(config);
            var authServerId = GeGRTEr7f3yu2n7grw22;  // string | `id` of the Authorization Server
            var clientId = 52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD;  // string | Client app ID
            var tokenId = sHHSth53yJAyNSTQKDJZ;  // string | `id` of Token

            try
            {
                // Revoke a refresh token for a client
                apiInstance.RevokeRefreshTokenForAuthorizationServerAndClient(authServerId, clientId, tokenId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthorizationServerClientsApi.RevokeRefreshTokenForAuthorizationServerAndClient: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
authServerIdstring`id` of the Authorization Server
clientIdstringClient app ID
tokenIdstring`id` of Token

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-
429Too Many Requests-

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

RevokeRefreshTokensForAuthorizationServerAndClient

void RevokeRefreshTokensForAuthorizationServerAndClient (string authServerId, string clientId)

Revoke all refresh tokens for a client

Revokes all refresh tokens for a Client

Example

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

namespace Example
{
    public class RevokeRefreshTokensForAuthorizationServerAndClientExample
    {
        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 AuthorizationServerClientsApi(config);
            var authServerId = GeGRTEr7f3yu2n7grw22;  // string | `id` of the Authorization Server
            var clientId = 52Uy4BUWVBOjFItcg2jWsmnd83Ad8dD;  // string | Client app ID

            try
            {
                // Revoke all refresh tokens for a client
                apiInstance.RevokeRefreshTokensForAuthorizationServerAndClient(authServerId, clientId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AuthorizationServerClientsApi.RevokeRefreshTokensForAuthorizationServerAndClient: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

NameTypeDescriptionNotes
authServerIdstring`id` of the Authorization Server
clientIdstringClient app ID

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-
429Too Many Requests-

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