I am using
PUT https://api.linkedin.com/v2/eventSubscriptions/(developerApplication:urn:li:developerApplication:{developer application ID},user:urn:li:user:{member ID},entity:urn:li:organization:{organization ID},eventType:ORGANIZATION_SOCIAL_ACTION_NOTIFICATIONS)
Linkedin API with all the parameters intact. Each URN is encoded as urn:li:organization:12345 is encoded to urn%3Ali%3Aorganization%3A12345 but still getting a 403 Response.
So it turns out that there's a lot of missing/incorrect information in the documentation. Since I'm working in go, here's how I finally got the url formatted correctly:
fmt.Sprintf(
"https://api.linkedin.com/v2/eventSubscriptions/(developerApplication:%s,user:%s,entity:%s,eventType:ORGANIZATION_SOCIAL_ACTION_NOTIFICATIONS)",
url.QueryEscape(fmt.Sprintf("urn:li:developerApplication:%s", appId)),
url.QueryEscape(fmt.Sprintf("urn:li:person:%s", userId)),
url.QueryEscape(fmt.Sprintf("urn:li:organization:%s", organizationID)),
)
The breakdown:
developerApplication:, user:, and entity:)X-Restli-Protocol-Version header and Authorization header/rest/eventSubscriptions/ url instead of /v2/eventSubscriptions/, you also need to include the LinkedIn-Version headerappId is not your app's client id, but instead the numeric id you see in the app settings url in the linkedin developer portal (i.e. https://www.linkedin.com/developers/apps/<appId>/auth)urn:li:person:<userId>, not urn:li:user:<userId>If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With