Links

Ignore invitation received

Tags: #linkedin #content #operations #snippet #invitation
Author: Florent Ravenel
Last update: 2023-05-29 (Created: 2022-04-05)
Description: This notebook is for tracking invitations received on LinkedIn that have been ignored.
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"

Get invitations

df_invitation = linkedin.connect(LI_AT, JSESSIONID).invitation.get_received()
df_invitation

Setup invitation id and shared secret

# Value in column "INVITATION_ID"
invitation_id = "691596420000000000"
# Value in column "SHARED_SECRET"
shared_secret = "6xubdsfs"
# If "INVITATION_TYPE" is "Profile" then False else True
is_generic = False

Model

Ignore invitation received

result = linkedin.connect(LI_AT, JSESSIONID).invitation.ignore(
invitation_id, shared_secret, is_generic
)

Output

Display result

result