This repository was archived by the owner on Jun 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
This repository was archived by the owner on Jun 11, 2025. It is now read-only.
How to join a group using Join URL and send message? #221
Copy link
Copy link
Open
Labels
Description
Here is the example:
username = "email@gmail.com"
password = "password"
SANDBOX_MODE = True
sandboxchatgrpUrl = [
"https://join.skype.com/pscCsBHhcGAJ",
]
from skpy import Skype
SKPY_DEBUG_HTTP = 1
slogin = Skype(username, password)
print("Skype Login Successful.....!")
try:
if SANDBOX_MODE == True:
response = [slogin.chats.urlToIds(urls) for urls in sandboxchatgrpUrl]
except Exception as e:
print("It seems like you are not the member of this Group.")
print(e)
sys.exit()
Messenger = [slogin.chats[resp["id"]] for resp in response]
I am trying to send message to the group but it is not getting successful and gives me error. I think just because I am not joined with the group it is giving error. Once I join the group manually then it send message without any issues. Please take a look at the example and let me know.
Here is the error:
Skype Login Successful.....!
Traceback (most recent call last):
File "C:\Python311\Lib\site-packages\skpy\chat.py", line 457, in __getitem__
return super(SkypeChats, self).__getitem__(key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\skpy\core.py", line 138, in __getitem__
return self.cache[key]
~~~~~~~~~~^^^^^
KeyError: '19:gibberrish@thread.skype'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\AIMS-RESEARCH\PycharmProjects\pythonProject\main.py", line 31, in <module>
Messenger = [slogin.chats[resp["id"]] for resp in response]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AIMS-RESEARCH\PycharmProjects\pythonProject\main.py", line 31, in <listcomp>
Messenger = [slogin.chats[resp["id"]] for resp in response]
~~~~~~~~~~~~^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\skpy\chat.py", line 459, in __getitem__
return self.chat(key)
^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\skpy\chat.py", line 491, in chat
json = self.skype.conn("GET", "{0}/users/ME/conversations/{1}".format(self.skype.conn.msgsHost, id),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\skpy\conn.py", line 237, in __call__
raise SkypeApiException("{0} response from {1} {2}".format(resp.status_code, method, url), resp)
skpy.core.SkypeApiException: ('404 response from GET https://azwcus1-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:gibberrish@thread.skype', <Response [404]>)