BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

how to get direct line token

Open Malith1994124 opened this issue 9 years ago • 4 comments

Can u tell me how to get this {token: your_token} with {secret: your_secret} for direct line web chat

Malith1994124 avatar Mar 14 '17 08:03 Malith1994124

i try this URL - 'https://directline.botframework.com/api/conversations?secret=XXXX'

but i get this error

"message": "The requested resource does not support http method 'GET'."

Can u help me

Malith1994124 avatar Mar 14 '17 08:03 Malith1994124

Hi @Malith1994124, you can get your token from https://dev.botframework.com/ where you registered your bot with the Bot Famework. On your bot's dashboard, click Edit on the Direct Line channel and create a secret in the following page.

danmarshall avatar Mar 14 '17 17:03 danmarshall

@danmarshall I edited your comment because you said WebChat channel but it should be Direct Line channel

@Malith1994124 you do not pass secrets as parameters, instead you pass them as an Authorization header. Please see the Direct Line docs for more information.

In general please use StackOverflow for general questions about the Bot Framework. I am closing this issue as it is not a problem with WebChat.

billba avatar Mar 14 '17 22:03 billba

This should answer what you're looking for https://github.com/compulim/BotFramework-Samples-Template/blob/master/packages/bot/src/index.js#L59

ShujaathKhan avatar Nov 15 '18 12:11 ShujaathKhan