Search code examples
ibm-sbt

IBM Social Business Toolkit getContacts API Fails With 403 Forbidden


I used to be able to use the IBM SBT getContacts API from either a perl script (with authentication provided in the request) or an internet browser (authentication popup would appear) and it would return the data in JSON format as documented on the IBM Connections Developers API reference page:

http://www-10.lotus.com/ldd/appdevwiki.nsf/xpAPIViewer.xsp?lookupName=API+Reference#action=openDocument&res_title=Contacts_getContacts_API&content=apicontent&sa=true

Recently, however, the API call has been returning a 403 forbidden status. If I sign in to the IBM Connections Cloud before trying to use the API via a browser, it is converted to:

https://apps.na.collabserv.com/mycontacts/home.html

Does anyone know what I need to do to get the API to work again?

Thanks.


Solution

  • The best API to use are https://apps.na.collabserv.com/lotuslive-shindig-server/social/rest/people/@me/@all?filterBy=type&filterOp=equals&filterValue=contacts&format=json

    You'll get a list of the following entries back...

    {
               "photos":
               [
               ],
               "telephone": "",
               "profileUrl": "",
               "mobilephone": "",
               "orgs":
               [
                   {
                       "value": "CONTACTS",
                       "type": "Source"
                   },
                   {
                       "value": "Mentorship Expressway",
                       "type": "Org"
                   }
               ],
               "website": "",
               "id": "na.collabserv.com:contact:160000909070",
               "fax": "",
               "connectedToId": 201238541234,
               "addresses":
               [
               ],
               "emailAddress": "[email protected]",
               "websites":
               [
               ],
               "objectId": 160000909070,
               "type": "FRIEND",
               "jobtitle": "",
               "updated": "2014-07-01T16:44:21.000Z",
               "ims":
               [
               ],
               "emails":
               [
                   {
                       "value": "CONTACTS",
                       "type": "Source"
                   },
                   {
                       "title": "Primary Email",
                       "email": "[email protected]"
                   }
               ],
               "org":
               {
                   "name": "Mentorship Expressway"
               },
               "displayName": "asdfasdf",
               "address": "",
               "companyId": 22285,
               "phoneNumbers":
               [
                   {
                       "value": "CONTACTS",
                       "type": "Source"
                   },
                   {
                       "title": "MOBILE",
                       "phone": "+ asdfasdf"
                   }
               ]
           }