Lists the redirect URIs for an environment.
cURL
| curl "https://api.workos.com/user_management/redirect_uris" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.user_management.list_redirect_uris |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.user_management.list_redirect_uris() |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.UserManagement().ListRedirectURIs(context.Background()) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos->userManagement()->listRedirectUris(); |
| import com.workos.WorkOS; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| workos.userManagement.listRedirectUris(); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.UserManagement.ListRedirectUrisAsync(); |
| use workos::Client; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .user_management() | |
| .list_redirect_uris() | |
| .await?; | |
| Ok(()) | |
| } |
| { | |
| "object": "list", | |
| "data": [ | |
| { | |
| "object": "redirect_uri", | |
| "id": "redir_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "uri": "https://example.com/callback", | |
| "default": true, | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } | |
| ], | |
| "list_metadata": { | |
| "before": "redir_01HXYZ123456789ABCDEFGHIJ", | |
| "after": "redir_01HXYZ987654321KJIHGFEDCBA" | |
| } | |
| } |
GET/user_management /redirect_uris
Parameters
Returns object
Creates a new redirect URI for an application.
cURL
| curl --request POST \ | |
| --url "https://api.workos.com/user_management/redirect_uris" \ | |
| --header "Authorization: Bearer sk_example_123456789" \ | |
| --header "Content-Type: application/json" \ | |
| -d @- <<'BODY' | |
| { | |
| "uri": "https://example.com/callback" | |
| } | |
| BODY |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.user_management.create_redirect_uri(uri: "https://example.com/callback") |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.user_management.create_redirect_uri(uri="https://example.com/callback") |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.UserManagement().CreateRedirectURI(context.Background(), &workos.UserManagementCreateRedirectURIParams{ | |
| URI: "https://example.com/callback", | |
| }) | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->userManagement() | |
| ->createRedirectUri(uri: "https://example.com/callback"); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.UserManagementApi.CreateRedirectUriOptions; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| CreateRedirectUriOptions options = | |
| CreateRedirectUriOptions.builder().uri("https://example.com/callback").build(); | |
| workos.userManagement.createRedirectUri(options); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.UserManagement.CreateRedirectUriAsync(new UserManagementCreateRedirectUriOptions { | |
| Uri = "https://example.com/callback", | |
| }); |
| use workos::Client; | |
| use workos::user_management::CreateRedirectUriParams; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .user_management() | |
| .create_redirect_uri( | |
| CreateRedirectUriParams { | |
| uri: "https://example.com/callback".into(), | |
| ..Default::default() | |
| } | |
| ) | |
| .await?; | |
| Ok(()) | |
| } |
| { | |
| "object": "redirect_uri", | |
| "id": "redir_01EHZNVPK3SFK441A1RGBFSHRT", | |
| "uri": "https://example.com/callback", | |
| "default": true, | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z" | |
| } |
POST/user_management /redirect_uris
Returns
Deletes a redirect URI from an application.
cURL
| curl --request DELETE \ | |
| --url "https://api.workos.com/user_management/redirect_uris/redir_01EHZNVPK3SFK441A1RGBFSHRT" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.user_management.delete_redirect_uris(id: "redir_01EHZNVPK3SFK441A1RGBFSHRT") |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.user_management.delete_redirect_uris(id_="redir_01EHZNVPK3SFK441A1RGBFSHRT") |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.UserManagement().DeleteRedirectURIs(context.Background(), "redir_01EHZNVPK3SFK441A1RGBFSHRT") | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->userManagement() | |
| ->deleteRedirectUris(id: "redir_01EHZNVPK3SFK441A1RGBFSHRT"); |
| import com.workos.WorkOS; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| workos.userManagement.deleteRedirectUris("redir_01EHZNVPK3SFK441A1RGBFSHRT"); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.UserManagement.DeleteRedirectUrisAsync("redir_01EHZNVPK3SFK441A1RGBFSHRT"); |
| use workos::Client; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .user_management() | |
| .delete_redirect_uris("redir_01EHZNVPK3SFK441A1RGBFSHRT") | |
| .await?; | |
| Ok(()) | |
| } |
DELETE/user_management /redirect_uris /:id
Parameters
Returns
Directory Sync Continue to the next section
Up next