Links

Get invitations sent

Tags: #linkedin #content #operations #snippet #invitation #dataframe
Author: Florent Ravenel
Last update: 2023-05-29 (Created: 2022-04-07)
Description: This notebook helps you to send invitations to connect on LinkedIn.
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.

Input

Import libraries

from naas_drivers import linkedin
import pandas as pd

Setup LinkedIn

# Lindekin cookies
LI_AT = "AQEDARCNSioDe6wmAAABfqF-HR4AAAF-xYqhHlYAtSu7EZZEpFer0UZF-GLuz2DNSz4asOOyCRxPGFjenv37irMObYYgxxxxxxx"
JSESSIONID = "ajax:12XXXXXXXXXXXXXXXXX"

Model

Get invitations

Get the information returned in a dataframe. Available columns :
  • PROFILE_ID : Receiver LinkedIn unique profile id
  • PROFILE_URL : Receiver LinkedIn profile URL
  • PUBLIC_ID : Receiver LinkedIn public profile id
  • FIRSTNAME : Receiver first name
  • LASTNAME : Receiver last name
  • FULLNAME : Receiver first and last name
  • OCCUPATION : Receiver occupation
  • PROFILE_PICTURE : Receiver profile picture
  • MESSAGE : Message sent with the invitation
  • SENT_AT : Date time the invitation was sent at (Only for "Profile" invitation)
  • INVITATION_TYPE : Type of invitation. It could be "Profile", "Company", "Event", "Newsletter"
  • INVITATION_DESC : Detailed type of invitation.
  • INVITATION_STATUS : Status of the invitation ("PENDING" for invitation from Profile)
  • INVITATION_ID : Secret to be used to accept or ignore invitation
df_invitation = linkedin.connect(LI_AT, JSESSIONID).invitation.get_sent()

Output

Display result

df_invitation