Skip to main content

PyPI License: MIT Python 3.10+

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)

Source distribution for ldraney-linkedin-sdk 0.1.2
File Size Uploaded
ldraney_linkedin_sdk-0.1.2.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ldraney-linkedin-sdk 0.1.2
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page