2

Since few days, I'm unable to get a token from Microsoft Bot Framework Web Chat API.

I do a GET request to https://webchat.botframework.com/api/tokens with PHP. I set the header Authorization to BotConnector MY_SECRET :

$options = array('http' => array(
    'method' => 'GET',
    'header' => 'Authorization: BotConnector ' . $secret
));

$context = stream_context_create($options);

$token = file_get_contents('https://webchat.botframework.com/api/tokens', false, $context);

The server answer is: "HTTP request failed! HTTP/1.1 405 Method Not Allowed".

My secret key is valid, I try also with a POST request but the server answers the same result.

If I call the Web Chat iFrame with my Secret Key, all works great but it's not secure.

Bista
  • 7,869
  • 3
  • 27
  • 55
Ludovic
  • 23
  • 3
  • That looks like a bug, report it on their github. You are doing it exactly as the docs say. –  Oct 31 '16 at 11:15

1 Answers1

0

This was a temporary bug/regression, I reported it and it's now fixed. The service should work as documented.

https://github.com/Microsoft/BotBuilder/issues/1556#issuecomment-257333517