3 Replies Latest reply on Apr 4, 2016 8:55 AM by rashedtalukder

    Jive Sandbox API authentication issue

    harish1985

      I am using https://sandbox.jiveon.com/ to connect with jive rest api. For that i have upload new add on in account. And getting client id and secret id.

       

      When i use for authentication process. i got an authorize code using redirect url, but when try to get auth token get Unauthorized client error.

       

      Please help me to solve this issue.

       

      this the curl code i use to get outh token: Curl result will be blank page.

       

      $ch = curl_init("https://sandbox.jiveon.com/oauth2/token?code=2nsml0vxne0s11tv19342eb5wwvrvn85.c&grant_type=authorization_code&client_id=gXXXXXXXXXXXXXXXXXXXXXo.i");

       

          curl_setopt($ch, CURLOPT_TIMEOUT, 60); //set to 60 seconds from BC API Guide v1 PDF example

      curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); //comment out this PUT line to change to a POST statement

      curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );

      curl_setopt( $ch, CURLOPT_USERPWD, "XXXXXXXXXXXXXXXXXXXXXXo.i:XXXXXXXXXXXXXXXXXXXXXXXX.s");

      //curl_setopt($ch, CURLOPT_POSTFIELDS, $query);

      curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, 0 );

      curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );

      $result = curl_exec($ch); //execute post

      curl_close($ch);

       

      echo "<pre>";

      print_r($result);