I want to get all the groups I'm memeber of the linkedin API. I use JavaScript SDK for this:
<head>
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: 77iju32v9t2i18
onLoad: onLinkedInLoad
authorize: true
</script>
<script type="text/javascript">
// Setup an event listener to make an API call once auth is complete
function onLinkedInLoad() {
IN.Event.on(IN, "auth", getGroupsData);
}
function onSuccessGroup(data) {
console.log(data);
}
function onError(error) {
console.dir(error);
}
// Use the API call wrapper to request the member's basic profile data
function getProfileData() {
IN.API.Raw("/people/~").result(onSuccess).error(onError);
}
function getGroupsData() {
IN.API.Raw("/people/~/group-memberships:(group:(id,name))?membership-state=member").result(onSuccessGroup).error(onError);
}
In the last function getGroupsData()
I queried the url: "/people/~/group-memberships:(group:(id,name))?membership-state=member" from here but it issued the error:
XHR finished loading: GET "https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name))?membership-state=member"
errorCode: 0
message: "Access to group-memberships denied"
requestId: "BEVJ2X6T7J"
status: 403
timestamp: 1434439902873
__proto__: Object
What's missing, how to configure request group url?
According to the new developer program
More info: https://developer.linkedin.com/support/developer-program-transition#troubleshooting