(RedirectUrls)
- List - List all redirect URLs
- Create - Create a redirect URL
- Get - Retrieve a redirect URL
- Delete - Delete a redirect URL
Lists all whitelisted redirect_urls for the instance
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
ListRedirectURLsResponse
Error Type |
Status Code |
Content Type |
Clerk.BackendAPI.Models.Errors.SDKError |
4XX, 5XX |
*/* |
Create a redirect URL
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
CreateRedirectURLResponse
Error Type |
Status Code |
Content Type |
Clerk.BackendAPI.Models.Errors.ClerkErrors |
400, 422 |
application/json |
Clerk.BackendAPI.Models.Errors.SDKError |
4XX, 5XX |
*/* |
Retrieve the details of the redirect URL with the given ID
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
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
The ID of the redirect URL |
redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3 |
GetRedirectURLResponse
Error Type |
Status Code |
Content Type |
Clerk.BackendAPI.Models.Errors.ClerkErrors |
404 |
application/json |
Clerk.BackendAPI.Models.Errors.SDKError |
4XX, 5XX |
*/* |
Remove the selected redirect URL from the whitelist of the instance
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
Parameter |
Type |
Required |
Description |
Example |
Id |
string |
✔️ |
The ID of the redirect URL |
redir_01FG4K9G5NWSQ4ZPT4TQE4Z7G3 |
DeleteRedirectURLResponse
Error Type |
Status Code |
Content Type |
Clerk.BackendAPI.Models.Errors.ClerkErrors |
404 |
application/json |
Clerk.BackendAPI.Models.Errors.SDKError |
4XX, 5XX |
*/* |