Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 137024a

Browse files
committed
Merge branch galexant:fix_guest_auth (PR #261)
2 parents f6381de + d6e8b61 commit 137024a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

skpy/conn.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -855,16 +855,11 @@ def auth(self, url, name):
855855
# Pretend to be Chrome on Windows (required to avoid "unsupported device" messages).
856856
cookies = self.conn("GET", "{0}/{1}".format(SkypeConnection.API_JOIN, urlId),
857857
headers={"User-Agent": SkypeConnection.USER_AGENT_BROWSER}).cookies
858-
ids = self.conn("POST", "{0}/api/v2/conversation/".format(SkypeConnection.API_JOIN),
859-
json={"shortId": urlId, "type": "wl"}).json()
860-
token = self.conn("POST", "{0}/api/v1/users/guests".format(SkypeConnection.API_JOIN),
858+
ids = self.conn("GET", "{0}/meetings/{1}".format(SkypeConnection.API_JOIN_CREATE, urlId)).json()
859+
token = self.conn("POST", "{0}/threads/{1}/members".format(SkypeConnection.API_JOIN_CREATE, ids.get("threadId")),
861860
headers={"csrf_token": cookies.get("csrf_token"),
862861
"X-Skype-Request-Id": cookies.get("launcher_session_id")},
863-
json={"flowId": cookies.get("launcher_session_id"),
864-
"shortId": urlId,
865-
"longId": ids.get("Long"),
866-
"threadId": ids.get("Resource"),
867-
"name": name}).json().get("skypetoken")
862+
json={"displayName": name}).json().get("skypetoken")
868863
# Assume the token lasts 24 hours, as a guest account only lasts that long anyway.
869864
expiry = datetime.now() + timedelta(days=1)
870865
return token, expiry

0 commit comments

Comments
 (0)