Download the PHP package avansaber/php-linkedin-api without Composer
On this page you can find all versions of the php package avansaber/php-linkedin-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-linkedin-api
avansaber/php-linkedin-api
Modern, fluent, framework-agnostic PHP client for the LinkedIn API (Marketing Developer Platform).
Installation
Requires PHP >= 8.1. This is a library; do not commit composer.lock in apps consuming this library.
Getting Started
- Create a LinkedIn Developer App and request access to the Marketing Developer Platform if needed.
- Obtain Client ID and Client Secret.
- Configure OAuth Redirect URI.
Authentication (Authorization Code Flow, PKCE optional)
Client Setup
Usage Examples
Fetch profile (Me)
Fetch organization
Create UGC post
Get post (REST)
SocialActions (comments/likes)
Pagination iterator
Media uploads (initialize + PUT)
Error Handling
Typed exceptions are thrown on non-2xx responses:
- AuthenticationException (401)
- PermissionException (403)
- NotFoundException (404)
- ValidationException (400)
- RateLimitException (429) with Retry-After
- ServerException (5xx)
The client captures X-LI-UUID from responses for troubleshooting.
Scopes & Access
- Member/profile:
r_liteprofile,r_emailaddress,w_member_social - Organization:
r_organization_social,w_organization_social,rw_organization_admin - Marketing/Ads (availability varies):
r_ads,rw_ads,r_campaigns,rw_campaigns
Many Marketing Developer Platform endpoints require partner/whitelisting.
CI & Quality
- PHPUnit test suite with retry/backoff tests
- PHPStan static analysis
- GitHub Actions matrix for PHP 8.1–8.3
Roadmap
- Chunked media upload (videos/documents)
- More resources and request DTOs (campaign creation/update)
- Integration tests examples
Modern LinkedIn API Support (2025 Update)
This package now supports LinkedIn's modern OpenID Connect API while maintaining backward compatibility.
✅ Recommended Modern Scopes
📱 Modern Profile Fetching
⚠️ Migration from Legacy API
| Legacy Scope | Modern Equivalent |
|---|---|
r_liteprofile |
openid + profile |
r_emailaddress |
email |
The package automatically handles fallbacks from modern to legacy endpoints for maximum compatibility.
All versions of php-linkedin-api with dependencies
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^3.0