Generate chat OAuth URL
Deprecated — use POST /integrations/channel-connections/oauth (connect) or POST /integrations/channel-endpoints/oauth (link_user) instead.
Generate an OAuth URL for chat integrations like Slack and MS Teams.
This URL allows subscribers to authorize the integration, enabling the system to send messages
through their chat workspace. The generated URL expires after 5 minutes.
Authorization
Authorization<token>API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".
In: header
Request Body
application/jsonRequiredsubscriberIdstringThe subscriber ID to link the channel connection to. For Slack: Required for incoming webhook endpoints, optional for workspace connections. For MS Teams: Optional. Admin consent is tenant-wide and can be associated with a subscriber for organizational purposes.
integrationIdentifierRequiredstringIntegration identifier
connectionIdentifierstringIdentifier of the channel connection that will be created. It is generated automatically if not provided.
contextobjectscopearray<string>Slack only: OAuth scopes to request during authorization. These define the permissions your Slack integration will have. If not specified, default scopes will be used: chat:write, chat:write.public, channels:read, groups:read, users:read, users:read.email. MS Teams: This parameter is ignored. MS Teams uses admin consent with pre-configured permissions in Azure AD. Note: The generated OAuth URL expires after 5 minutes.
userScopearray<string>Slack only, link_user mode: User-level OAuth scopes to request during authorization. Used when mode is "link_user" to identify the Slack user via "Sign in with Slack". If not specified, defaults to: identity.basic.
modestringOAuth flow mode. Use "connect" (default) to create a workspace channel connection, or "link_user" to identify the subscriber's Slack user ID without creating a connection.
"connect" | "link_user"connectionModestringConnection mode that determines how the channel connection is scoped. Use "subscriber" (default) to associate the connection with a specific subscriber. Use "shared" to associate the connection with a context instead of a subscriber — subscriberId will not be stored on the connection.
"subscriber" | "shared"autoLinkUserbooleanWhen true, after the workspace/tenant connection is created the OAuth flow also links the subscriber who clicked "Connect" as a personal endpoint. For Slack, this uses the authed_user.id already returned by oauth.v2.access — no extra redirect. For MS Teams, this triggers a second OAuth redirect for delegated user-identity consent. Defaults to false when omitted; the SlackConnectButton and MsTeamsConnectButton SDK components default this to true.
Header Parameters
idempotency-keystringA header for idempotency purposes
Response Body
Created
urlRequiredstringThe OAuth authorization URL for the chat provider. For Slack: https://slack.com/oauth/v2/authorize?... For MS Teams: https://login.microsoftonline.com/.../adminconsent?... This URL should be presented to the user to authorize the integration. Expires after 5 minutes.
Update integration as primary POST
Update an integration as **primary** by its unique key identifier **integrationId**. This API will set the integration as primary for that channel in the current environment. Primary integration is used to deliver notification for sms and email channels in the workflow.
Create a channel connection POST
Create a new channel connection for a resource for given integration. Only one channel connection is allowed per resource and integration.