Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 329
twasbrillig Avatar asked Jan 29 '23 04:01

twasbrillig


1 Answers

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'

like image 129
E.Big Avatar answered Mar 04 '23 11:03

E.Big