DEV Community

loading...
Cover image for How to automate Skype?

How to automate Skype?

maulik profile image Maulik ・2 min read

Skype, Hangout, Slack, Microsoft Teams, zoom, and many more chat and video calling applications we have but as a developer, we use a single application for a project, mostly one that our client is comfortable with.

I have to use Skype and there are no official APIs for automating Skype unlike other applications so I found an unofficial opensource python library SkPY for interacting with the Skype HTTP API.

The aim of this library is to provide feature-complete support for Skype for Web. So far, it supports:

  • contacts: retrieving the contact list and groups, sending and responding to invites, searching the directory
  • conversations: sending text messages, marking read, rich text formatting, file/image transfers, shared contacts
  • group chats: creating new conversations, adding/removing members, delegating admins, setting topic/history, join URLs
  • events: receiving conversation messages, status and endpoint changes
  • and more: translation API, user settings, credit/subscription info

Here is the sample python code snippet to automatically respond to a message

from skpy import SkypeEventLoop, SkypeNewMessageEvent

class SkypePing(SkypeEventLoop):
    def __init__(self):
        super(SkypePing, self).__init__(username, password)
        print("initialized! watching for events")
    def onEvent(self, event):
        if isinstance(event, SkypeNewMessageEvent) \
          and not event.msg.userId == self.userId :
          # sending automated reply
          event.msg.chat.sendMsg("Hi there! Maulik is currently not available. If urgent you can call him at 91********")

sk = SkypePing()
sk.loop()
Enter fullscreen mode Exit fullscreen mode

Let's see the demo

We can achieve many things by automation like we can create a script to send a reminder to a group/person and schedule it through cron job or we can keep watch on how many calls we have attended and how much time we spent on skype meetings etc.

Discussion

pic
Editor guide
Collapse
herdygerdy profile image
herdygerdy

Hello Maulik
I would like to ask if You could help me in building an web bases app that sines at elderly or disabled People in using Skype. What we need is a Way to automate Skype from a web app so that a Call is initiated without any questions just start the Call . Presentæy we have a question about “do You really want to start Skype “ and of course we do ! Can You help? I Will of course be willing to pay for the service

Collapse
maulik profile image
Maulik Author

Hi @herdygerdy ,
I would be happy to consult. Could you please share more details via email? Here is my email address: maulik.des@gmail.com
Thank you