All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateOAuth2Scope | POST /api/v1/authorizationServers/{authServerId}/scopes | Create a Custom Token Scope |
DeleteOAuth2Scope | DELETE /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Delete a Custom Token Scope |
GetOAuth2Scope | GET /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Retrieve a Custom Token Scope |
ListOAuth2Scopes | GET /api/v1/authorizationServers/{authServerId}/scopes | List all Custom Token Scopes |
ReplaceOAuth2Scope | PUT /api/v1/authorizationServers/{authServerId}/scopes/{scopeId} | Replace a Custom Token Scope |
OAuth2Scope CreateOAuth2Scope (string authServerId, OAuth2Scope oAuth2Scope)
Create a Custom Token Scope
Creates a custom token scope
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateOAuth2ScopeExample
{
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 AuthorizationServerScopesApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var oAuth2Scope = new OAuth2Scope(); // OAuth2Scope |
try
{
// Create a Custom Token Scope
OAuth2Scope result = apiInstance.CreateOAuth2Scope(authServerId, oAuth2Scope);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerScopesApi.CreateOAuth2Scope: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
authServerId | string | `id` of the Authorization Server | |
oAuth2Scope | OAuth2Scope |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteOAuth2Scope (string authServerId, string scopeId)
Delete a Custom Token Scope
Deletes a custom token scope
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteOAuth2ScopeExample
{
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 AuthorizationServerScopesApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var scopeId = 0TMRpCWXRKFjP7HiPFNM; // string | `id` of Scope
try
{
// Delete a Custom Token Scope
apiInstance.DeleteOAuth2Scope(authServerId, scopeId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerScopesApi.DeleteOAuth2Scope: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
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]
OAuth2Scope GetOAuth2Scope (string authServerId, string scopeId)
Retrieve a Custom Token Scope
Retrieves a custom token scope
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetOAuth2ScopeExample
{
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 AuthorizationServerScopesApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var scopeId = 0TMRpCWXRKFjP7HiPFNM; // string | `id` of Scope
try
{
// Retrieve a Custom Token Scope
OAuth2Scope result = apiInstance.GetOAuth2Scope(authServerId, scopeId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerScopesApi.GetOAuth2Scope: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope |
- Content-Type: Not defined
- Accept: application/json
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]
List<OAuth2Scope> ListOAuth2Scopes (string authServerId, string q = null, string filter = null, string after = null, int? limit = null)
List all Custom Token Scopes
Lists all custom token scopes
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListOAuth2ScopesExample
{
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 AuthorizationServerScopesApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var q = "q_example"; // string | (optional)
var filter = "filter_example"; // string | (optional)
var after = "after_example"; // string | (optional)
var limit = -1; // int? | (optional) (default to -1)
try
{
// List all Custom Token Scopes
List<OAuth2Scope> result = apiInstance.ListOAuth2Scopes(authServerId, q, filter, after, limit).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerScopesApi.ListOAuth2Scopes: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
authServerId | string | `id` of the Authorization Server | |
q | string | [optional] | |
filter | string | [optional] | |
after | string | [optional] | |
limit | int? | [optional] [default to -1] |
- Content-Type: Not defined
- Accept: application/json
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]
OAuth2Scope ReplaceOAuth2Scope (string authServerId, string scopeId, OAuth2Scope oAuth2Scope)
Replace a Custom Token Scope
Replaces a custom token scope
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceOAuth2ScopeExample
{
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 AuthorizationServerScopesApi(config);
var authServerId = GeGRTEr7f3yu2n7grw22; // string | `id` of the Authorization Server
var scopeId = 0TMRpCWXRKFjP7HiPFNM; // string | `id` of Scope
var oAuth2Scope = new OAuth2Scope(); // OAuth2Scope |
try
{
// Replace a Custom Token Scope
OAuth2Scope result = apiInstance.ReplaceOAuth2Scope(authServerId, scopeId, oAuth2Scope);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AuthorizationServerScopesApi.ReplaceOAuth2Scope: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
authServerId | string | `id` of the Authorization Server | |
scopeId | string | `id` of Scope | |
oAuth2Scope | OAuth2Scope |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]