linkedin-send-message 1.2.0
A python library to send messages to user on linkedin automatically.
License: Apache License 2.0
Keywords: linkedin python datakund automation login send-messages messages

Linkedin-Send-Message is a python library to send message on linkedin using browser automation. 
It currently runs only on windows.

### Example 1
In this example we first import library, then we login with cookies and then send message on linkedin with profile link.
```sh
from linkedin_send_message import *
true=True;false=False
list_of_cookies=[
{
    "domain": ".linkedin.com",
    "expirationDate": 1676463230,
    "hostOnly": false,
    "httpOnly": false,
    "name": "_ga",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "GA1.2.1029585723.1610264105",
    "id": 1
}]
#please replace the above sample cookies with your cookies, can see below link of how to fetch cookies
linkedin.login_cookie(cookies=list_of_cookies)
linkedin.send_message(profile_link='https://www.linkedin.com/in/abhishek-chaudhary-/', message='Hi')
```

### Example 2
In this example we first import library, then we login with cookies and then send message on linkedin by name.
```sh
from linkedin_send_message import *
list_of_cookies=[
{
    "domain": ".linkedin.com",
    "expirationDate": 1676463230,
    "hostOnly": false,
    "httpOnly": false,
    "name": "_ga",
    "path": "/",
    "sameSite": "unspecified",
    "secure": false,
    "session": false,
    "storeId": "0",
    "value": "GA1.2.1029585723.1610264105",
    "id": 1
}]
#please replace the above sample cookies with your cookies, can see below link of how to fetch cookies
linkedin.login_cookie(cookies=list_of_cookies)
linkedin.send_message_by_name(keyword='Kevin', message='hi')
```

### Youtube Video
[![](http://img.youtube.com/vi/_MLvN3ND0uw/0.jpg)](https://www.youtube.com/watch?v=_MLvN3ND0uw "")


This module depends on the following python modules
* [requests](https://pypi.org/project/requests/)
* [datakund](https://pypi.org/project/datakund/)

#### DataKund
[datakund](https://pypi.org/project/datakund/) is needed for browser automation. As soon as this library is imported in code, automated browser will open up. Complete documentation for Linkedin Automation available [here](https://linkedin-api.datakund.com/en/latest/)

### Installation

```sh
pip install linkedin-send-message
```

### Import
```sh
from linkedin_send_message import *
```

### Login with credentials
```sh
linkedin.login(username="linkedin username",password="linkedin password")
```

### Login with cookies
```sh
linkedin.login_cookie(cookies=list_of_cookies)
```

### Send message by profile link
```sh
linkedin.send_message(profile_link='profile_link',message='message to send')
```

### Send message by name
```sh
linkedin.send_message_by_name(keyword='name of person', message='message to send')
```

### Send Feedback to DataKund Team
```sh
datakund.send_feedback(feedback="Need help with this ......")
```

### Cookies
To login with cookies [Edit this Cookie Extension](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=en) can be added to browser. Please check [this](https://abhishek-chaudhary.medium.com/how-to-get-cookies-of-any-website-from-browser-22b3d6348ed2) link how to get cookies to login to your linkedin.

### Contact Us
* [Telegram](https://t.me/datakund)
* [Website](https://datakund.com)