2 Replies Latest reply on Sep 9, 2015 6:03 AM by ryanrutan

    The client ID is invalid or not registered

    vinaykachhawat

      Hi @Ryan Rutan ,Team

       

      This is regarding token issue. Followed steps mentioned at OAuth 2.0 and created addon at https://sandbox.jiveon.com/  using attached zip.

      Embedding generated client ID into following url : https://sandbox.jiveon.com/oauth2/authorize?client_id=8mfwsfr82lq76o4nzacx9wg414gppvox.i&response_type=code  and got the value for code as below :

      https://sandbox.jiveon.com/redirect?code=68n0h2e2w0kvak2nn4br3eu5jwp45okc.c&state=null

       

      Then as a next step for Obtaining an Access Token using Authorization Code Grant, created and run below query on windows 7:

       

      C:\>curl -u '8mfwsfr82lq76o4nzacx9wg414gppvox.i:f

      jxype9o0v9xh9ja14df9c42qw9dex05.s' -d 'code=p2q986nsbakwihca4c2jpgdw97zxq6hh.c:g

      rant_type=authorization_code:client_id=8mfwsfr82lq76o4nzacx9wg414gppvox.i' https

      ://sandbox.jiveon.com/oauth2/token

       

      But getting below error message

      {"error":"invalid_client","error_description":"The client ID is invalid or not r

      egistered: '8mfwsfr82lq76o4nzacx9wg414gppvox.i"}

       

      Since we have successfully installed addon and took client ID and secret ID from there itself then why still getting error message  'client ID is invalid or not registered'.

       

      Any help is greatly appreciated.

       

      Thanks!

       

      Vinay

        • Re: The client ID is invalid or not registered
          vinaykachhawat

          Hi Murali VP , Pawan Shah , Nils Heuer Ryan Rutan and support team,

           

          Would you be able to share your insight on this.

           

          Regards,

          Vinay

            • Re: The client ID is invalid or not registered

              Not sure if this is a difference in the curl command for Windows vs. Linux, but

               

              C:\>curl -u '8mfwsfr82lq76o4nzacx9wg414gppvox.i:fjxype9o0v9xh9ja14df9c42qw9dex05.s' -d 'code=p2q986nsbakwihca4c2jpgdw97zxq6hh.c:grant_type=authorization_code:client_id=8mfwsfr82lq76o4nzacx9wg414gppvox.i' https

              ://sandbox.jiveon.com/oauth2/token

               

              But the bolded + underlined colons (:) above should be (&)

               

              Other than that, it looks like you are doing everything ok at first glance.    I would however uninstall/reinstall your addon given that you have shared your client secret publicly.  In the future, it is usually better to obfuscate at-least half of the random characters to prevent them from being persisted.

               

              Note, if you are using the Jive SDK (Node.js) if you update to the latest version, you can regenerate an OAuth 2.0 Client add-on with the following command:

               

                   jive-sdk create oauth2-client --oauthAuthorizeUrl="YOUR_REDIRECT_URL"

               

              Hope this helps.