tomquirk / linkedin-api

👨‍💼Linkedin API for Python
MIT License
1.72k stars 401 forks source link

Check for existing connection invite #283

Closed M1z23R closed 1 year ago

M1z23R commented 1 year ago

Hi, first of all - great repo with lots of valuable information. Second - I need a bit of help. I am doing something similar in javascript (chrome extension), basically, it has preset message that I'd like to send to the profiles I am visiting. So far, my logic is - once you are on /in/ url, get network distance info and preview one of two buttons - send a preset message and send connection req with note / message. This works fine, but I want to disable both buttons if connection request is already sent out - I don't care if it had a note or not. From network distance request, I can only get connection degree and not wether I am already in "connecting" state or not. If you have any tips which don't include looping through my entire sent invitations I'd appreciate it. I am thinking of finding the requesting which handles how profile is displayed - "connect"/" cancel connect"

M1z23R commented 1 year ago

So sorry about this above - found the solution myself but in case anyone else or you need it - https://www.linkedin.com/voyager/api/relationships/dash/memberRelationships/urn:li:fsd_memberRelationship:ENTITYURN?decorationId=com.linkedin.voyager.dash.deco.relationships.MemberRelationshipV2-23

memberRelationshipData contains invitation, connection, *noInvitation properties depending on the relationship.