microsoft / microsoft/BotFramework-DirectLineJS

POST https://directline.botframework.com/v3/directline/conversations 403 (Forbidden)

未关闭
#434 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
199
派生
133
PR 合并指标
30 天内没有已合并 PR

描述

I get this error since last week. Our bot worked fine and suddenly started giving us this error. Until last week we used https://directline.botframework.com/v3/directline/tokens/generate to generate a token. We then switched to https://europe.directline.botframework.com/v3/directline/tokens/generate because our resources (Azure Bot, Web App running the bot, WebApp running the web chat; all F0-tier) were created in West Europe last year but with no success.

The exact error is:

{
    "message": "ajax error 403",
    "xhr": {},
    "request": {
        "async": true,
        "crossDomain": false,
        "withCredentials": false,
        "headers": {
            "Accept": "application/json",
            "Content-Type": "application/json",
            "Authorization": "Bearer <Token>",
            "x-ms-bot-agent": "DirectLine/3.0 (directlinejs; WebChat/4.17.0 (Full) 0.15.5)",
            "X-Requested-With": "XMLHttpRequest"
        },
        "method": "POST",
        "responseType": "json",
        "timeout": 20000,
        "url": "https://directline.botframework.com/v3/directline/conversations",
        "body": "{\"user\":{}}"
    },
    "status": 403,
    "responseType": "json",
    "response": {
        "error": {
            "code": "RegionNotAllowed",
            "message": "The request received in france but target regional bot belongs to europe. Please check BaseURI  https://docs.microsoft.com/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-api-reference?view=azure-bot-service-4.0#base-uri."
        }
    }
}

The error states that the request is received in france, but none of our resources were created in france. I already renewed the keys of the directline channel, which did not work.

Any help is appreciated.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

先从报告中引用的 Direct Line REST API 基础 URI 文档开始,然后比较令牌生成端点与会话 POST 端点及其 RegionNotAllowed 响应。使用列出的 URL 重现请求,并确认哪个区域端点被接受;完成的标准是记录已确认的原因和解决方案,或确定问题位于此客户端库之外。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
api
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。