If you are using a native app, you can osapi. libraries to make secured calls to Jive without needing to leverage OAuth. At this point, it's not clear how the error above correlates to the App scenario you've stated. Could you provide some more context?
We have tried to make the Content Manager App for our clients which has been originally developed by Pawan Shah and his team. The complete code has been under siddharthadeshpande89/jive-content-manager · GitHub . We have installed those files in the Microsoft environment and hosted the app through Jive server. The code includes osapi calls. We have deployed the app in three instances: localhost, dev and UAT. In localhost and dev it is fully functional where the content can be transferred anywhere between group, space and projects.But in UAT which is the only instance that is SSO configured, its functions are limited as the content can be transferred only between group to project, space to group and group to group. We are getting the following errors in the logs:
2016-03-07 03:44:37,428 [TaskEngineWorker-pool-1] [::] DEBUG com.jivesoftware.community.app.activity.poll.ActivityPollingQueueTask - #ActivityPollingQueueTask: running
2016-03-07 03:44:37,429 [TaskEngineWorker-pool-1] [::] DEBUG com.jivesoftware.community.app.activity.poll.ActivityPollingQueueTask - #ActivityPollingQueueTask: completed: no activity
2016-03-07 03:44:38,343 [http-nio-0.0.0.0-9200-exec-15] [-1:ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.oauth2.OAuth2TokenHandler - Error when processing access token request: The client ID is invalid or not registered: k7luzxgfs7ji2uwb9wodqkb4g96i8y5j.i
2016-03-07 03:44:38,462 [http-nio-0.0.0.0-9200-exec-22] [-1:ANONYMOUS:REGULAR] ERROR com.jivesoftware.community.oauth2.OAuth2TokenHandler - Error when processing access token request: The client ID is invalid or not registered: k7luzxgfs7ji2uwb9wodqkb4g96i8y5j.i
We also have provided full access to the app by adding Jive Service Signature in the definition.json of the extension.zip but it has not resolved the issue.
We have never faced this kind of issue in the app before. As the main difference between the instances is that the UAT is SSO configured, could that be causing this issue?
I'm speaking with Lea at JiveWorld right now, and she pointed me at this question, so I just took a quick look. It looks to me like the clientID you have saved on the middleware is out of sync with what Jive has. Based on the nature of the error, this definitely looks like an issue with the middleware talking back to the Jive server via the API (since the app client side likely isn't using OAuth to talk to Jive). One option here would be to try the "Reconnect to Service" and making sure you are handling ensuing request properly -- make sure you are persisting the proper client ID you receive and the proper token. Then, later, make sure that is the proper client ID that is being attached to the request for the authorization (along with the token). Basically, the error is saying you are sending a client ID in the authorization header, but Jive doesn't know about that client ID -- so something is out of sync.
Thank you for looking into this case.
We have generated authorization code and access token for the app.
We have also defined the OAuth service in the Admin console.
On defining the above also , we are getting now the following error in the logs:
2016-03-16 06:30:06,324 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.community.media.video.providers.DefaultVideoProvider - While retrieving key, received statusCode 'Invalid license key' with partial body 'Invalid license key'
2016-03-16 06:30:06,332 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.base.taskmanager.impl.LocalExecutor - Failed to execute task
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
... 12 more
Caused by: com.jivesoftware.community.media.video.providers.ProviderCommunicationException: Error requesting an auth token
... 17 more
Please suggest if we are missing anything.
I mentioned this to Lea at JiveWorld, but that video error looks likely unrelated, so something you should probably open a case for.
As I said previously, it looks like the clientId you are sending from the middleware is out of sync with Jive. Reconnecting the service, if you were using the Node SDK, would likely resolve this issue. I understand you're using a custom .NET SDK though? In your SDK, when you get a registration request for an existing instance, do you update the clientId you have persisted?
If you can send me a direct message with your UAT URL, I might be able to look in the DB to find the clientId Jive is expecting you to be sending, which you could then compare to the value you have persisted. Alternatively, you could capture the request that comes down when you click "Reconnect to Service" in the add-on settings and verify the clientId Jive is sending is the one you have persisted (which is likely the one showing up in the log statements above).
Thank you Drew for looking into this.
The Client Id which we are getting in logs is different than what we have in add-on settings.
We are not using custom .NET SDK for the app though.
I am unable to Direct Message you as the option will only come when both the parties follow each other.
I have started following you and when it is also initiated from your side, I will forward you the UAT URL.
Also we are not using any service, could you please let us know if there is any way to resolve this error.
Please let us know if you need any further information from our end.
Neha, I'm not sure we're on the same page. When I was talking to Lea at the conference, she indicated that you were using a .NET SDK for the middleware for this app. And looking at the linked GitHub source, it does appear there are middleware routes associated with the app. Can you clarify the deployment footprint of the app? And when (during which action) you are seeing errors?
We are not using .NET SDK for the app.
I have direct messaged you the UAT URL , deployment footprint and other necessary details.
Please let me know if you have any questions.