I have created a bot using Bot builder SDK 4.x. I can access the bot using the emulator and the message end point- http://localhost:3978/api/messages. I am also passing some query string parameters to the messaging endpoint like this- http://localhost:3978/api/messages?botid=HRbot which I can access within the Startup of my bot.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseDefaultFiles()
.UseStaticFiles()
.Use(async (context, next) =>
{
_config["BotId"] = context.Request.Query["botid"];
await next.Invoke();
})
.UseBotFramework();
}
After deploying the bot to Azure I want my client to use the message endpoint and pass their own query string parameters. Since, the bot needs to be embeded within the webpage I can either use Web chat channel and script or use Direct line channel . Both of them uses a secret key and no end points. So, I don't see any option to pass a query string parameter to the message endpoint.
I saw we can pass some token as some parameters to the Direct line channel using the web chat JavaScript SDK, like as shown below.
BotChat.App({
bot: bot,
locale: params['locale'],
resize: 'detect',
// sendTyping: true, // defaults to false. set to true to send 'typing' activities to bot (and other users) when user is typing
speechOptions: speechOptions,
user: user,
directLine: {
domain: params['domain'],
secret: params['s'],
token: params['t'],
webSocket: params['webSocket'] && params['webSocket'] === 'true' // defaults to true
}
}, document.getElementById('chatBot'));
I am not sure how I can use my bot service message API for every clients who wants to consume the API using a different query string parameter.
Any help with this? Please let me know if I can clarify more.

