Azure Bot Service Direct Line API v3.0 constantly throwing 403 error on starting conversation Azure Bot Service Direct Line API v3.0 constantly throwing 403 error on starting conversation azure azure

Azure Bot Service Direct Line API v3.0 constantly throwing 403 error on starting conversation


Read the doc provided by MS about the authentication: https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-3.0

It says:

Authorization: Bearer SECRET_OR_TOKEN

So change this line:

xhr.setRequestHeader ("Authorization", "Basic " + btoa("Bearer:GI3UQr2GYoA.cwA.wHo.h1AyNQKXSESWZGFrf-yf_Cm3XwDRy38Yn-xzgUton-E"));

To:

xhr.setRequestHeader ("Authorization", "Bearer GI3UQr2GYoA.cwA.wHo.h1AyNQKXSESWZGFrf-yf_Cm3XwDRy38Yn-xzgUton-E");

And it works fine!

enter image description here