Installation
SKILL.md
Call the LinkedIn API with curl + jq. The user's bearer token is in
$LINKEDIN_TOKEN; every call needs Authorization: Bearer $LINKEDIN_TOKEN.
LinkedIn posts must be authored by the member's URN. Get the member id from the
OpenID userinfo endpoint, then build urn:li:person:{sub}.
SUB=$(curl -sS -H "Authorization: Bearer $LINKEDIN_TOKEN" \
"https://api.linkedin.com/v2/userinfo" | jq -r .sub)
AUTHOR="urn:li:person:$SUB"
echo "$AUTHOR"
Errors are JSON with message / serviceErrorCode — show them verbatim.
401 → token expired (tokens last ~60 days), re-connect the LinkedIn connector.