Skip to content

Latest commit

 

History

History
147 lines (93 loc) · 6.3 KB

README.md

File metadata and controls

147 lines (93 loc) · 6.3 KB

RedirectUrls

(RedirectUrls)

Overview

Available Operations

  • List - List all redirect URLs
  • Create - Create a redirect URL
  • Get - Retrieve a redirect URL
  • Delete - Delete a redirect URL

List

Lists all whitelisted redirect_urls for the instance

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.RedirectUrls.ListAsync();

// handle response

Response

ListRedirectURLsResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*

Create

Create a redirect URL

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

CreateRedirectURLRequestBody req = new CreateRedirectURLRequestBody() {
    Url = "https://my-app.com/oauth-callback",
};

var res = await sdk.RedirectUrls.CreateAsync(req);

// handle response

Parameters

Parameter Type Required Description
request CreateRedirectURLRequestBody ✔️ The request object to use for the request.

Response

CreateRedirectURLResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 400, 422 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*

Get

Retrieve the details of the redirect URL with the given ID

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.RedirectUrls.GetAsync(id: "redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3");

// handle response

Parameters

Parameter Type Required Description Example
Id string ✔️ The ID of the redirect URL redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3

Response

GetRedirectURLResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 404 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*

Delete

Remove the selected redirect URL from the whitelist of the instance

Example Usage

using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.RedirectUrls.DeleteAsync(id: "redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3");

// handle response

Parameters

Parameter Type Required Description Example
Id string ✔️ The ID of the redirect URL redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3

Response

DeleteRedirectURLResponse

Errors

Error Type Status Code Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors 404 application/json
Clerk.BackendAPI.Models.Errors.SDKError 4XX, 5XX */*