rujabbar
rujabbar

Reputation: 21

"Site Missing" error when invoking Direct Line API to generate a token

When I invoke the Direct Line API(using Postman) to generate a token based on a secret, I am getting an error that says "code": "BadArgument", "message": "Site Missing". I am sending a POST request with the Authorization set to "Bearer Token".

Upvotes: 2

Views: 498

Answers (2)

Alex Ink
Alex Ink

Reputation: 1

I am using DirectLine with CopilotStudio and faced the same Site is missing ResourceNotFound error. On my local env everything worked well, but not in prod or Azure infra. This url's changing fix it.

var directLineClient = new DirectLineClient(directLineSecret)
{
    BaseUri = new Uri("https://europe.directline.botframework.com")
}

This url can be useful, too

Upvotes: 0

Kristaps Baumanis
Kristaps Baumanis

Reputation: 605

Had the same problem - make sure you're not using the App Service Extension Keys that show up front and center when you open the DirectLine configuration. You have to click on the site (either Default Site or whatever site you've made) and then use one of the secret keys from there. They switched the positioning of these around from the previous UI, so these can be easily confused.

Upvotes: 2

Related Questions