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

Offen
#434 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
25/100
Issue-Typ
Bug
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Tech-Stack
typescript
Bereich
api

Rechercherichtung

Beginne mit der im Bericht referenzierten Dokumentation zum Basis-URI der Direct Line REST API. Vergleiche anschließend den Token-Generierungsendpunkt mit dem Conversation-POST-Endpunkt und seiner RegionNotAllowed-Antwort. Stelle die Anfrage anhand der aufgeführten URLs nach und bestätige, welcher regionale Endpunkt akzeptiert wird; abgeschlossen bedeutet, eine bestätigte Ursache und Lösung zu dokumentieren oder festzustellen, dass das Problem außerhalb dieser Client-Bibliothek liegt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
199
Forks
133
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/BotFramework-DirectLineJS

Alle Issues in microsoft/BotFramework-DirectLineJS

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.