oauthbotframeworkskypemicrosoft-skype-bot

Skype Bot OAuth error that wasn't happening before


I previously had a Skype bot able to post messages using the API.

But on 11/17/17 I started getting this error on every attempt, and as a result, no message gets posted. I haven't changed anything.

requests.exceptions.HTTPError: 401 Client Error: The provided 'OAuth' ticket failed authentication. for url: https://apis.skype.com/v2/conversations/[conversation]/activities/

The process I use is to get an access token witha post to https://login.microsoftonline.com/common/oauth2/v2.0/token and then to use that token to post a message to https://apis.skype.com/v2/conversations/[conversation]/activities/

It's able to get the token fine, but then when the message post is called, it raises the above exception.


Solution

  • I've faced with exactly the same problem and this worked for me:

    I left all send messages endpoint as is for v2, BUT in token generation POST payload I've changed 'scope' -> 'https://api.botframework.com/.default'