1

Using a browser REST client to POST to the activity stream at e.g.

https://connectionsww.demos.ibm.com/connections/opensocial/basic/rest/activitystreams/@me/@all

...with the settings prescribed in IBM Connections OpenSocial API > POSTing new events

...results in the following response:

<error xmlns="http://www.ibm.com/xmlns/prod/sn">
    <code>403</code>
    <message>You are not authorized to perform the requested action.</message>
    <trace></trace>
</error>

What am I missing?

This same approach works nicely on IBM Connections 4.0.

Which setting needs 'switching on'?

dvdsmpsn
  • 2,839
  • 1
  • 26
  • 40

2 Answers2

1

Try a URL like this... https://sbtdev.swg.usma.ibm.com:444/connections/opensocial/basic/rest/activitystreams/@me/@all

I added the Basic/Rest component, and it worked for me.

1 - Added URL https://sbtdev.swg.usma.ibm.com:444/connections/opensocial/basic/rest/activitystreams/@me/@all

2 - Changed Method to Post

3 - Added Content-Type: application/json

4 - Authentication -> Basic

5 - Logged IN

6 - Posted

Rest Client Setup

Paul Bastide
  • 1,505
  • 4
  • 17
  • 22
0

Same thing here: 403 when I make an AJAX call to an IBM Connections 6.0 REST API url. Same error in Chrome, Firefox and IE11. When I open the same URL in a separate browser tab, everything works fine.

Comparing the http headers of both calls, and fiddling with Postman, the diference is the presence and value of the atribute Origin.

Seems that Connections allows calls from its own server. For example, when: Origin: connections.mycompany.com. It also allows calls when Origin is not defined, which happens when the url is called from a separate browser tab.

There is a doc at IBMs Support site that confirms this - http://www-01.ibm.com/support/docview.wss?uid=swg21999210. It also suggests a workaround that did the job for me: unsetting the Origin attribute in the IBM HTTP Server that is in front of your Connections instance. Add the lines below to the httpd.conf file:

Header unset Origin
RequestHeader unset Origin