linkedin-sdk
Python SDK for the LinkedIn API v202510.
Installation
pip install ldraney-linkedin-sdk
Quick Start
from linkedin_sdk import LinkedInClient
# Reads LINKEDIN_ACCESS_TOKEN and LINKEDIN_PERSON_ID from env
client = LinkedInClient()
# Create a text post
result = client.create_post("Hello from Python!")
print(result) # {'postUrn': 'urn:li:share:...', 'statusCode': 201}
# Get user info
info = client.get_user_info()
print(info['name'])
# Delete a post
client.delete_post("urn:li:share:7...")
Authentication
Set environment variables:
export LINKEDIN_ACCESS_TOKEN="your_token"
export LINKEDIN_PERSON_ID="your_person_id"
Or pass directly:
client = LinkedInClient(access_token="...", person_id="...")
OAuth
from linkedin_sdk import LinkedInClient
# Build auth URL (no client needed)
url = LinkedInClient.get_auth_url(
client_id="...",
redirect_uri="http://localhost:8080/callback",
scopes=["openid", "profile", "email", "w_member_social"],
)
# Exchange code for token (classmethod)
token = LinkedInClient.exchange_code(
code="auth_code",
client_id="...",
client_secret="...",
redirect_uri="http://localhost:8080/callback",
)
# Refresh token
new_token = LinkedInClient.refresh_token(
refresh_token="...",
client_id="...",
client_secret="...",
)
License
MIT
Metadata
Release files for ldraney-linkedin-sdk 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ldraney_linkedin_sdk-0.1.2.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ldraney_linkedin_sdk-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / ldraney_linkedin_sdk-0.1.2.tar.gz
| Download URL | ldraney_linkedin_sdk-0.1.2.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e692f9b5da23641008d9ba02d4d0d6d05cae91d2b90fa0c47ea897d3d2dd1b24
|
|
BLAKE2b-256 checksum How to use checksums |
34336dc3d6ce407f30fe0fba35c0e359c0d80e25261620b461121d197be7b0cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 16, 2026.
Transparency logRelease files / ldraney_linkedin_sdk-0.1.2-py3-none-any.whl
| Download URL | ldraney_linkedin_sdk-0.1.2-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a7a75a18def329a3342f8ea69b52c8aa502485b2c11de52d524a2c2c914b254
|
|
BLAKE2b-256 checksum How to use checksums |
3d937f52d86ffb40fbc088fedc835a6ed65aa06e4d323c1e9eeed8251876edc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 16, 2026.
Transparency log