Skip to content

Generate OAuth URL to link a subscriber user identity

Generate an OAuth URL that links a specific subscriber to their chat identity (Slack user ID or MS Teams user OID). The generated URL expires after 5 minutes.

POST
/v1/integrations/channel-endpoints/oauth

Authorization

Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

In: header

Request Body

application/jsonRequired
subscriberIdRequiredstring

The subscriber ID to link to their chat identity. Required — this operation always binds a specific subscriber to a user identity in the chat provider.

integrationIdentifierRequiredstring

Integration identifier

connectionIdentifierstring

Identifier of the existing channel connection to associate this user endpoint with. Generated automatically if not provided.

contextobject
userScopearray<string>

Slack only: User-level OAuth scopes for "Sign in with Slack". Defaults to: identity.basic. MS Teams: ignored — uses delegated OpenID scopes (openid, profile, User.Read).

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

Created

urlRequiredstring

The 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.

export interface Response {
  /**
   * The 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.
   */
  url: string;
}
 
curl -X POST "https://api.novu.co/v1/integrations/channel-endpoints/oauth" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "subscriberId": "subscriber-123",
    "integrationIdentifier": "string",
    "connectionIdentifier": "slack-connection-abc123",
    "context": {
      "property1": "org-acme",
      "property2": "org-acme"
    },
    "userScope": [
      "identity.basic"
    ]
  }'
{
  "url": "https://slack.com/oauth/v2/authorize?state=..."
}

On this page

No Headings
Edit this page on GitHub