5 Replies Latest reply on May 2, 2016 1:17 PM by yuval.twig

    System Webhook

    Sachin Patil

      Hi ,

       

      Tried to run  curl command

       

      curl -k -i -X POST "https://xxxxxx.jiveon.com/api/core/v3/webhooks" -H "Authorization: Bearer <auth_GRANT_CODE>" -H "Content-Type: application/json" -d "events:user_session" -d "callback: https://xxxxxxxxxxxx/controller/entitlement"

       

      {

        "error" : {

          "status" : 400,

          "message" : "A JSONObject text must begin with '{' at character 1 of '{"

        }

      }curl: (6) Could not resolve host: events:user_session,callback:https

      curl: (3) [globbing] unmatched close brace/bracket in column 1

       

      Any help!!!!

       

      Pawan Shah Nagendra Balachandra

        • Re: System Webhook
          aron.racho

          This part of the curl could be problematic:

           

          -d "events:user_session" -d "callback: https://xxxxxxxxxxxx/controller/entitlement"

           

          typically you'd format the json body like this, surrounded by single quotes:

          -d'{"events": "user_session", "callback": "...." }'

            • Re: System Webhook
              Sachin Patil

              I tried below paste

              -d "{'events':'user_session','callback':'xxxxxxxxx'}"

               

              got Response :

              HTTP/1.1 201 Created

              Server: Apache

              X-Jive-Request-Id: 23a0d180-0e85-11e6-b945-005056a429f3

              X-Jive-Flow-Id: 23a0d181-0e85-11e6-b945-005056a429f3

              X-Frame-Options: SAMEORIGIN

              P3P: CP="CAO PSA OUR"

              Location: xxxxxxxxxxxxxxxxxxxx/api/core/v3/webhooks/1011

              Content-Type: application/json

              Expires: Sat, 30 Apr 2016 03:39:27 GMT

              Cache-Control: no-store, no-cache, must-revalidate, private, max-age=0

              X-JSL: D=58653 t=1461987567254290

              Date: Sat, 30 Apr 2016 03:39:27 GMT

              Connection: close

              Set-Cookie: jive.login.ts=1461987567256; Path=/; Secure; HttpOnly;HttpOnly

              Set-Cookie: BIGipServerpool_rsa-preview.jiveon.com=1889906186.20480.0000; path=/

               

               

              {

                "id" : "1011",

                "resources" : {

                  "self" : {

                    "allowed" : [ "PUT", "DELETE", "GET" ],

                    "ref" : "xxxxxxxxxxxxxxx/api/core/v3/webhooks/1011"

                  }

                },

                "events" : "user_session",

                "callback" : "xxxxxxxxxxxxxxxxxxxxxxxx/controller/entitlement",

                "queueSize" : 0

              }

               

              Aron Racho

              • Re: System Webhook

                So nice to see your friendly face around here!

                Thanks for helping out Aron!