# How to connect Rocket chat to Nexcloud? - Using Oauth

**URL:** <https://forums.rocket.chat/t/how-to-connect-rocket-chat-to-nexcloud-using-oauth/8103>\
**Category:** Community Support\
**Tags:** projectideas\
**Created:** [August 12, 2020, 7:14am UTC](https://forums.rocket.chat/t/how-to-connect-rocket-chat-to-nexcloud-using-oauth/8103 "2020-08-12T07:14:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tahlia5294](https://avatars.discourse-cdn.com/v4/letter/t/dbc845/32.png) [@Tahlia5294](https://forums.rocket.chat/u/Tahlia5294)\
**Post date:** [August 12, 2020, 7:14am UTC](https://forums.rocket.chat/t/how-to-connect-rocket-chat-to-nexcloud-using-oauth/8103/1 "2020-08-12T07:14:17Z")

</div>

I have a problem using Oauth to connect Rocket chat to NextCloud for 3 days.

I have this error on [the](https://www.walgreenlistens.one/) log file

```auto
I20200526-13:18:53.862(2) server.js:204 Meteor ➔ publish null -> userId: null, arguments: [] 
I20200526-13:18:53.877(2) server.js:204 Meteor ➔ method loadLocale -> userId: null, arguments: ["fr"] 
I20200526-13:18:53.936(2) server.js:204 Meteor ➔ method public-settings/get -> userId: null, arguments: [] 
W20200526-13:19:26.649(2) (oauth_server.js:392) Error in OAuth Server: Failed to complete OAuth handshake with nextcloud at http://www.sorghun.com/my_documents/index.php/apps/oauth2/api/v1/token. failed [400] {"error":"invalid_client"}
I20200526-13:19:27.485(2) Exception while invoking method 'login' Error: Failed to complete OAuth handshake with nextcloud at http://www.sorghun.com/my_documents/index.php/apps/oauth2/api/v1/token. failed [400] {"error":"invalid_client"} at CustomOAuth.getAccessToken (app/custom-oauth/server/custom_oauth_server.js:134:18) at Object.handleOauthRequest (app/custom-oauth/server/custom_oauth_server.js:191:26) at OAuth._requestHandlers.<computed> (packages/oauth2/oauth2_server.js:10:33) at middleware (packages/oauth/oauth_server.js:161:5) at /snap/rocketchat-server/1433/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 

```

What does it mean, please. All config seems ok.

Thank you.
