Operations for the Connect API.
Summary
Functions
Complete external authentication
Create a new client secret for a Connect Application
Create m2m application
Create oauth application
Delete a Connect Application
Delete a Client Secret
Get a Connect Application
List Client Secrets for a Connect Application
List Connect Applications
Update a Connect Application
Functions
@spec complete_oauth2(WorkOS.Client.t(), map(), keyword()) :: {:ok, WorkOS.ExternalAuthCompleteResponse.t()} | {:error, WorkOS.Error.error()}
Complete external authentication
Completes an external authentication flow and returns control to AuthKit. This endpoint is used with Standalone Connect to bridge your existing authentication system with the Connect OAuth API infrastructure.
After successfully authenticating a user in your application, calling this endpoint will:
- Create or update the user in AuthKit, using the given
idas itsexternal_id. - Return a
redirect_uriyour application should redirect to in order for AuthKit to complete the flow
Users are automatically created or updated based on the id and email provided. If a user with the same id exists, their information is updated. Otherwise, a new user is created.
If you provide a new id with an email that already belongs to an existing user, the request will fail with an error as email addresses are unique to a user.
Parameters
params— request body mapopts— per-request options (seeWorkOS.Client.request/5)
@spec create_application_client_secret( WorkOS.Client.t(), String.t(), map(), keyword() ) :: {:ok, WorkOS.NewConnectApplicationSecret.t()} | {:error, WorkOS.Error.error()}
Create a new client secret for a Connect Application
Create new secrets for a Connect Application.
Parameters
id— The application ID or client ID of the Connect Application.params— request body mapopts— per-request options (seeWorkOS.Client.request/5)
@spec create_m2m_application(WorkOS.Client.t(), map(), keyword()) :: {:ok, WorkOS.ConnectApplication.t()} | {:error, WorkOS.Error.error()}
Create m2m application
Create a Connect Application
Create a new Connect Application. Supports both OAuth and Machine-to-Machine (M2M) application types.
Sets application_type ("m2m") automatically.
Parameters
params— request body map. Required::name,:organization_id. Optional::description,:scopes.opts— per-request options (seeWorkOS.Client.request/5)
@spec create_oauth_application(WorkOS.Client.t(), map(), keyword()) :: {:ok, WorkOS.ConnectApplication.t()} | {:error, WorkOS.Error.error()}
Create oauth application
Create a Connect Application
Create a new Connect Application. Supports both OAuth and Machine-to-Machine (M2M) application types.
Sets application_type ("oauth") automatically.
Parameters
params— request body map. Required::name,:is_first_party. Optional::description,:scopes,:redirect_uris,:uses_pkce,:organization_id.opts— per-request options (seeWorkOS.Client.request/5)
@spec delete_application(WorkOS.Client.t(), String.t(), keyword()) :: {:ok, term()} | {:error, WorkOS.Error.error()}
Delete a Connect Application
Delete an existing Connect Application.
Parameters
id— The application ID or client ID of the Connect Application.opts— per-request options (seeWorkOS.Client.request/5)
@spec delete_client_secret(WorkOS.Client.t(), String.t(), keyword()) :: {:ok, term()} | {:error, WorkOS.Error.error()}
Delete a Client Secret
Delete (revoke) an existing client secret.
Parameters
id— The unique ID of the client secret.opts— per-request options (seeWorkOS.Client.request/5)
@spec get_application(WorkOS.Client.t(), String.t(), keyword()) :: {:ok, WorkOS.ConnectApplication.t()} | {:error, WorkOS.Error.error()}
Get a Connect Application
Retrieve details for a specific Connect Application by ID or client ID.
Parameters
id— The application ID or client ID of the Connect Application.opts— per-request options (seeWorkOS.Client.request/5)
@spec list_application_client_secrets(WorkOS.Client.t(), String.t(), keyword()) :: {:ok, [WorkOS.ApplicationCredentialsListItem.t()]} | {:error, WorkOS.Error.error()}
List Client Secrets for a Connect Application
List all client secrets associated with a Connect Application.
Parameters
id— The application ID or client ID of the Connect Application.opts— per-request options (seeWorkOS.Client.request/5)
@spec list_applications(WorkOS.Client.t(), map(), keyword()) :: {:ok, WorkOS.Page.t(WorkOS.ConnectApplication.t())} | {:error, WorkOS.Error.error()}
List Connect Applications
List all Connect Applications in the current environment with optional filtering.
Parameters
params— query parameters::before,:after_,:limit,:order,:registration_types,:organization_idopts— per-request options (seeWorkOS.Client.request/5)
@spec update_application(WorkOS.Client.t(), String.t(), map(), keyword()) :: {:ok, WorkOS.ConnectApplication.t()} | {:error, WorkOS.Error.error()}
Update a Connect Application
Update an existing Connect Application. For OAuth applications, you can update redirect URIs. For all applications, you can update the name, description, and scopes.
Parameters
id— The application ID or client ID of the Connect Application.params— request body mapopts— per-request options (seeWorkOS.Client.request/5)