Update examples to use /userinfo and /posts endpoints#73
Open
ZLeventer wants to merge 2 commits intolinkedin-developers:mainfrom
Open
Update examples to use /userinfo and /posts endpoints#73ZLeventer wants to merge 2 commits intolinkedin-developers:mainfrom
ZLeventer wants to merge 2 commits intolinkedin-developers:mainfrom
Conversation
…g from batch create response When the JSON response lacks an "elements" key, json_data.get() returns None, which cannot be iterated. Default to an empty list instead, matching the pattern already used by BatchFinderResponseFormatter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…edin-developers#29) Python's double underscore prefix triggers name mangling, which is inappropriate for regular private functions and methods. Renamed all non-dunder `__` prefixed functions/methods to single underscore `_` across encoder.py, decoder.py, and client.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Apr 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/meendpoint with/userinfo, update field names to OpenID Connect claims (sub,given_name,family_name,picture, etc.), and update required scopes fromr_liteprofiletoopenid+profile/mewith/userinfo, usesubinstead ofidfor the person URN, and remove the legacy/ugcPostsexample entirely (endpoint is deprecated) — only the versioned/postsAPI remainsThese changes align the examples with the current LinkedIn API, where the v2
/meendpoint and/ugcPostshave been deprecated in favor of OpenID Connect's/userinfoand the versioned/postsAPI respectively.Fixes #60 — fresh take on the same changes proposed in the stale PR from Apr 2024.
Test plan
get_profile.pysuccessfully calls/userinfoand returns OpenID Connect claimscreate_posts.pycreates a post via/postsusing thesubfield from/userinfo/meor/ugcPostsremain in examples