https://github.com/toxblh/skype-http-api
https://github.com/toxblh/skype-http-api
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/toxblh/skype-http-api
- Owner: Toxblh
- License: mit
- Created: 2020-10-10T15:49:45.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T15:12:56.000Z (over 3 years ago)
- Last Synced: 2025-04-23T01:47:20.105Z (over 1 year ago)
- Language: TypeScript
- Size: 4.74 MB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Skype-Http-API
[](https://www.npmjs.com/package/skype-http-api)
[](https://github.com/Toxblh/skype-http-api)
[](https://codecov.io/gh/Toxblh/skype-http-api)
Unofficial Skype API for Node.js via HTTP.
This relies on the Skype Web Application and requires the credentials of the account you want to use: use it with care.
## [Documentation](https://toxblh.github.io/skype-http-api/)
## Installation
- Stable version:
```shell
npm install --save skype-http-api
```
Import for Typescript or Javascript ES6:
```typescript
import * as skypeHttp from 'skype-http-api'
```
Import for Javascript ES5:
```javascript
var skypeHttp = require('skype-http-api')
```
## Quick start
The code below sends `Hello, World!` to all of `bob`'s contacts. If bob's skype account was an MSA account(rather than older skype login) he would login with "bob@bobsdomain.com".
```typescript
import { Api, connect } from 'skype-http-api'
async function run() {
const api: Api = await connect({
credentials: { username: 'bob', password: 'hunter2' },
})
for (const contact of await api.getContacts()) {
await api.sendMessage({ textContent: 'Hello, World!' }, contact.mri)
}
}
run()
```
## Running example
The demo will prompt you your username and password: you should use your Skype account or MSA.
```shell
git clone https://github.com/Toxblh/skype-http-api
cd skype-http-api
# Ensure that you have the latest versions of the global dependencies
sudo npm install -g gulp-cli
npm install
npm start
```
This will perform a verbose connection (it should log the acquisition of various tokens), display the list of contacts,
set the status to `"Online"` and start to respond to messages.
Fork repo https://github.com/ocilo/skype-http