41 Replies Latest reply on May 4, 2014 6:27 AM by yuval.varkel

    Notify file deletion in the ESP for the external storage


      Hi everyone,


      I'm having some issues to tell the external storage that a file has been deleted in the ESP.


      The workflow is the following:

      1) The ESP is installed in Jive and it stores some registration data (jiveUrl, clientId and clientSecret)

      2) When a new group is created with the external storage, Jive send an oauthCode (among other things). I'm using this oauthCode to get an access_token so I could send notifications to Jive

      curl -v -u '<clientId>:<clientSecret>' -X POST -d 'client_id=<clientId>' -d 'code=<oauthCode>' -d 'grant_type=authorization_code' <jiveUrl>/oauth2/token

      The request completes successfully with the following content:


      3) Upload a file to the group an get the externalId (<externalId>)

      4) Try to delete the file from the ESP (I'm executing the following command from another computer)

      curl -v -H 'Authorization: bearer <access_token>' -X DELETE <jiveUrl>/api/jivelinks/v1/exstorage/containers/1032/files/<externalId>

      But I get a 403 http error:


        "code" : 4026,

        "message" : "The request could not be validated as originating from within the SBS application"



      According to the example in the jive SDK, I should be sending a header "Authorization: Bearer <access_token>" (notice the upper-case B) but If I do so I get the following error:

      { "error" : { "status" : 403, "message" : "You are not allowed to perform the requested operation" } }


      Am I missing something? Lev Waisberg, Yuval Varkel could you point me to a solution?