I'm trying to get all the activities from a section in a community Activity.
First I loop over all the activities:
ActivityList allActivities = service.getAllActivities();
for(Activity activity : allActivities) {
if("community_activity".equals(activity.getEntryType())) {
...
For every community activities I loop over the ActivityNodes:
ActivityNodeList activityNodesFromActivity = service.getActivityNodes(activity.getActivityId());
for (ActivityNode activityNode : activityNodesFromActivity) {
...
So far so good. But because some of the activities can be Sections, I want to loop over them once more to get their 'child' activities.
ActivityNodeList activityNodesFromSection = service.getActivityNodes(activityNode.getActivityId());
Now I get 403 errors for these requests:
<error xmlns="http://www.ibm.com/xmlns/prod/sn">
<code/>
<message>
Identifier: LCFED1E22083D5412BB4A4E5ABB1D26B10 Request denied
</message>
<displaymessage/>
<errortype/>
<trace>
java.lang.Exception: Identifier: LCFED1E22083D5412BB4A4E5ABB1D26B10 Request denied
</trace>
</error>
Because of that the SBT loses the OAuth token and I have to login again on SmartCloud and grand access.
Is there another/better way to get the activities from a section in a community activity?
btw: I'm using the second last version of the SBT: 1.0.0.20140125-1133