1 Reply Latest reply on Feb 9, 2017 4:33 PM by huevang83

    problem retrieving OAuth Access token for Jive cloud rest api Authentication using Authorization Code


      We have a Jive cloud instance authenticating against our ADFS 3.0 server using SAML protocol and it's working fine

      Recently we are trying to access Jive's Rest Api, and we followed the instruction How To Use OAuth 2.0 for REST API Calls  and http://tools.ietf.org/html/rfc6749#section-4.1


      First, we created a test addon and installed in Jive, and do /oauth2/authorize as below:




      it brings the browser to our ADFS login page which is good, and after login with correct credential we see this (which is also good i believe)

      Capture (2).PNG


      after I clicked "allow" it redirect the browser to the desired redirect_url defined in my addon with a pending code (I believe it's the Authorization code)."hsi488fxcu90entxe2xuxqsv5aktoxtw.c"


      then i Use the code to do a get:


      (which is equivalent to curl -u 'ne6drmhtggo33ryrg9vr12eov4qsuz9l.i:l4mmoohzv9qsbbuh1vfb02e9fwft441m.s' -d 'code=hsi488fxcu90entxe2xuxqsv5aktoxtw.c&grant_type=authorization_code&client_id=ne6drmhtggo33ryrg9vr12eov4qsuz9l.i' https://spark-otpp.jiveon.com/oauth2/token )


      unfortunately i received:{"error":"unauthorized_client","error_description":"The client failed to authorize"} as below.... I don't know why it says failed to authorize... since I haven't done any rest request yet, what I am doing here is retrieving the token in Authentication process.



      now this is blocking our development process for using jive's rest api and I don't know if there is a way to debuy or to know the detail reason for this error.

      Gifford Louie