1 Reply Latest reply on Jan 27, 2016 3:20 PM by john.decker

    API call returns"Bad credentials"

    csandahl@cisco.com

      I'm trying to use the Jive API to return the comments of a very simple document as follows:

       

      curl -v -u csandahl "https://cisco.jiveon.com/api/core/v3/contents/1312516/comments"

       

      Does the API work with SSO credentials?

       

      Using my single sign on credentials I get the following error:

       

      Enter host password for user 'csandahl':

      * STATE: INIT => CONNECT handle 0x80048330; line 1090 (connection #-5000)

      * Added connection 0. The cache now contains 1 members

      *   Trying 2600:1406:2c:187::35e...

      * STATE: CONNECT => WAITCONNECT handle 0x80048330; line 1143 (connection #0)

      * Connected to cisco.jiveon.com (2600:1406:2c:187::35e) port 443 (#0)

      * STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x80048330; line 1240 (connection #0)

      * ALPN, offering http/1.1

      * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH

      * successfully set certificate verify locations:

      *   CAfile: /etc/pki/tls/certs/ca-bundle.crt

        CApath: none

      * TLSv1.2 (OUT), TLS header, Certificate Status (22):

      * TLSv1.2 (OUT), TLS handshake, Client hello (1):

      * STATE: SENDPROTOCONNECT => PROTOCONNECT handle 0x80048330; line 1254 (connection #0)

      * TLSv1.2 (IN), TLS handshake, Server hello (2):

      * TLSv1.2 (IN), TLS handshake, Certificate (11):

      * TLSv1.2 (IN), TLS handshake, Server key exchange (12):

      * TLSv1.2 (IN), TLS handshake, Server finished (14):

      * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):

      * TLSv1.2 (OUT), TLS change cipher, Client hello (1):

      * TLSv1.2 (OUT), TLS handshake, Finished (20):

      * TLSv1.2 (IN), TLS change cipher, Client hello (1):

      * TLSv1.2 (IN), TLS handshake, Finished (20):

      * SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384

      * ALPN, server accepted to use http/1.1

      * Server certificate:

      *        subject: C=US; ST=CA; L=Palo Alto; O=Jive Software; OU=Technical Operations; CN=*.jiveon.com

      *        start date: Jun 29 18:42:50 2015 GMT

      *        expire date: Jun 29 18:42:49 2016 GMT

      *        subjectAltName: cisco.jiveon.com matched

      *        issuer: C=NL; L=Amsterdam; O=Verizon Enterprise Solutions; OU=Cybertrust; CN=Verizon Akamai SureServer CA G14-SHA2

      *        SSL certificate verify ok.

      * STATE: PROTOCONNECT => DO handle 0x80048330; line 1275 (connection #0)

      * Server auth using Basic with user 'csandahl'

      > GET /api/core/v3/contents/1312516/comments HTTP/1.1

      > Host: cisco.jiveon.com

      > Authorization: Basic Y3NhbmRhaGw6UGFzc3dvcmQyMyE=

      > User-Agent: curl/7.45.0

      > Accept: */*

      >

      * STATE: DO => DO_DONE handle 0x80048330; line 1337 (connection #0)

      * STATE: DO_DONE => WAITPERFORM handle 0x80048330; line 1464 (connection #0)

      * STATE: WAITPERFORM => PERFORM handle 0x80048330; line 1474 (connection #0)

      * HTTP 1.1 or later with persistent connection, pipelining supported

      < HTTP/1.1 401 Unauthorized

      * Server Apache is not blacklisted

      < Server: Apache

      < X-Jive-Request-Id: 825ece91-c513-11e5-a253-0050568b26bf

      < X-Jive-Flow-Id: 825ece92-c513-11e5-a253-0050568b26bf

      < X-Frame-Options: SAMEORIGIN

      * Authentication problem. Ignoring this.

      < WWW-Authenticate: Basic realm="Jive SBS"

      < Expires: Wed, 27 Jan 2016 16:32:08 GMT

      < X-JSL: D=279689 t=1453912328646935

      < Content-Type: text/plain

      < Date: Wed, 27 Jan 2016 16:32:08 GMT

      < Connection: close

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

      < Set-Cookie: X-JCAPI-Token=KG6BHn7j; Path=/; Secure; HttpOnly

      < Set-Cookie: BIGipServerpool_cisco.jiveon.com=3651906570.20480.0000; path=/

      <

      * TLSv1.2 (IN), TLS alert, Client hello (1):

      * nread <= 0, server closed connection, bailing

      * STATE: PERFORM => DONE handle 0x80048330; line 1632 (connection #0)

      * Curl_done

      * Closing connection 0

      * The cache now contains 0 members

      * TLSv1.2 (OUT), TLS alert, Client hello (1):

      {"code":401,"message":"Bad credentials"}

       

      Does the API work with SSO credentials?