Okta.Sdk.Api.AuthorizationServerClientsApi
October 22, 2025 ยท View on GitHub
All URIs are relative to https://subdomain.okta.com
| Method | HTTP request | Description |
|---|---|---|
| GetRefreshTokenForAuthorizationServerAndClient | GET /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId} | Retrieve a refresh token for a client |
| ListOAuth2ClientsForAuthorizationServer | GET /api/v1/authorizationServers/{authServerId}/clients | List all client resources for an authorization server |
| ListRefreshTokensForAuthorizationServerAndClient | GET /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens | List all refresh tokens for a client |
| RevokeRefreshTokenForAuthorizationServerAndClient | DELETE /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens/{tokenId} | Revoke a refresh token for a client |
| RevokeRefreshTokensForAuthorizationServerAndClient | DELETE /api/v1/authorizationServers/{authServerId}/clients/{clientId}/tokens | Revoke 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
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| clientId | string | Client app ID | |
| tokenId | string | `id` of Token | |
| expand | string | Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too 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
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too 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
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| clientId | string | Client app ID | |
| expand | string | Valid value: `scope`. If specified, scope details are included in the `_embedded` attribute. | [optional] |
| after | string | Specifies the pagination cursor for the next page of tokens | [optional] |
| limit | int? | The maximum number of tokens to return (maximum 200) | [optional] [default to -1] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too 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
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| clientId | string | Client app ID | |
| tokenId | string | `id` of Token |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too 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
| Name | Type | Description | Notes |
|---|---|---|---|
| authServerId | string | `id` of the Authorization Server | |
| clientId | string | Client app ID |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]