Generate chat OAuth URL
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
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.
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.