12 Replies Latest reply on Apr 27, 2016 8:14 PM by nagendra1891

    System Webhook : jive cloud

    nagendra1891

      Hey guys,

       

      trying to register a system webhook on jive cloud instance.

       

      Steps followed :

       

      curl -i -X POST "https://sample.jiveon.com/api/core/v3/webhooks"

        -H "Authorization: Bearer <ACCESS_TOKEN>"

        -H "Content-Type: application/json"

        -d'{

        "events" : "user_account,user_session,user_membership",

        "callback": "http://your.service.com/webhooks"

        }'

       

      To register a System webhook user should be a super admin or full access on the instance.? i have got a full access on the instance.

       

       

      Step1 :  Getting a Access Token            Authorization: Bearer <ACCESS_TOKEN>   

       

        installed a dummy addon which works great !! connects to my service, exchanges data ( all good )

        now to get a access token for webhook i ping

       

       

                1 > https://####my jive url #######/oauth2/authorize?client_id=########client id ##########&response_type=co…

                      jive redirect me to access grant screen ( Great works as expected )   i click on Grant access.

       

                2>  http://localhost:8090/?code=######## code ############&state=null         (Gives me the code in the redirect url )

                     Awesome worked as expected

       

       

                 3> curl -u 'Client ID :Client Serect ID' -d 'code=######################&grant_type=authorization_code&client_id=####################'https://My urlll/oauth2/token 

       

               

                At this point the jive gets mad at the client or the registered  addon it says

       

      {

        "error": "unauthorized_client",

        "error_description": "The client failed to authorize"

      }

       

      did any one face the same issue ??? any help on this would be great

      Rashed Talukder