Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upgrade headers to versioned API 202208 #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
alexander-zierhut wants to merge 1 commit into zoonman:master
base: master
Choose a base branch
Loading
from alexander-zierhut:master

Conversation

Copy link

@alexander-zierhut alexander-zierhut commented Jan 3, 2023
edited
Loading

The Linkedin API now uses versioning and will deprecate the legacy version on Feb, 28.

I have migrated using setApiHeaders, but so not everyone has to read up on this themselves, I am creating this PR.

What I have tested already:

  • Create a posts
  • Upload assets
  • Login with Linkedin
  • Read profile / group data

Some more testing for deprecations might be needed.

Sources:
https://www.linkedin.com/developers/news/featured-updates/versioning-content-launch
https://learn.microsoft.com/en-us/linkedin/marketing/versioning

For everyone else reading this:

// Change the API endpoint to the new versioned endpoint
$this->client->setApiRoot("https://api.linkedin.com/rest/");
// Set the API headers to use the new versioning
$this->client->setApiHeaders([
 'Content-Type' => 'application/json',
 'x-li-format' => 'json',
 "LinkedIn-Version" => "202208",
]);```

sammyaxe reacted with thumbs up emoji
Copy link

sammyaxe commented Nov 8, 2023

Will this get merged?

Copy link

sammyaxe commented Nov 8, 2023

@alexander-zierhut feel free to open PR here https://github.com/sammyaxe/linkedin-api-php-client, will make you maintainer aswell

Copy link
Author

alexander-zierhut commented Nov 9, 2023
edited
Loading

@sammyaxe Sure, will do. I guess you used my workaround as well? This repo has become kind of stale. I'd also like a new version which at least still upgrades it's dependencies. If you are serious about this, I'll be switching our projects to this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /