Comment on page
Send invitation to profile
Tags: #linkedin #invitation #naas_drivers #content #snippet #text
Last update: 2023-05-29 (Created: 2021-06-18)
Description: This notebook allows users to send invitations to connect on LinkedIn to other profiles.
Disclaimer:
This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by Linkedin or any of its affiliates or subsidiaries. It uses an independent and unofficial API. Use at your own risk.
This project violates Linkedin's User Agreement Section 8.2, and because of this, Linkedin may (and will) temporarily or permanently ban your account. We are not responsible for your account being banned.
from naas_drivers import linkedin
import naas
If you are using the Chrome Extension:
- Copy/Paste your token in your extension
- Login/Logout your LinkedIn account
- Your secrets "LINKEDIN_LI_AT" and "LINKEDIN_JSESSIONID" will be added directly on your naas everytime you login and logout.
or
If you are not using the Google Chrome Extension, learn how to get your cookies on LinkedIn and set up the values below:
- 🍪 li_at
- 🍪 JSESSIONID
# Cookies
LI_AT = naas.secret.get("LINKEDIN_LI_AT") or "li_at"
JSESSIONID = naas.secret.get("LINKEDIN_JSESSIONID") or "JSESSIONID"
# Profile URL you want to send the invitation to
recipient_url = "https://www.linkedin.com/in/****/"
# Message to add with your invitation
message = "Hello, \nI will be happy to connect!"
result = linkedin.invitation.send(recipient_url=RECIPIENT_URL, message=message)
result
Last modified 3mo ago