microsoft / microsoft/botframework-webchat-embed

Support custom token endpoints (non-Copilot Studio)

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Summary

Add support for custom token endpoints that are not Copilot Studio, such as a server-side proxy that holds a Direct Line secret and returns conversation tokens.

Motivation

Currently the library assumes the token endpoint is a Copilot Studio endpoint and auto-detects the regional Direct Line domain via regionalchannelsettings. Users with custom token endpoints (e.g., their own backend that holds a Direct Line secret and generates tokens) can already use data-webchat-token-url, but the regional domain auto-detection won't work since there's no regionalchannelsettings API.

Proposed Change

Add a data-webchat-domain attribute that lets users explicitly set the Direct Line endpoint URL (e.g., https://europe.directline.botframework.com/v3/directline). When set, this overrides the auto-detected regional domain.

This is the only missing piece — the token endpoint pattern already works. Users should keep their Direct Line secret on the server and expose a token endpoint, not put secrets in HTML.

Note on Direct Line secrets

This library will not support putting Direct Line secrets in HTML attributes. Secrets are long-lived server-side credentials meant for secure environments (key vaults, backend services). The correct pattern for client-side usage is always a token endpoint that returns short-lived conversation tokens.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the embed SDK handling for data-webchat-token-url and regionalchannelsettings, then trace how the Direct Line domain is selected. Add the proposed data-webchat-domain configuration and verify that it overrides regional auto-detection while the existing custom token endpoint flow continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.