Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocketChatClient.channels.history bad request #85

Open
starhound opened this issue Jun 3, 2020 · 0 comments
Open

rocketChatClient.channels.history bad request #85

starhound opened this issue Jun 3, 2020 · 0 comments

Comments

@starhound
Copy link

starhound commented Jun 3, 2020

rocketChatClient.authentication.login('username', 'password', function(err, body) { if(err) console.log(err); else console.log(body); //BAD REQUEST rocketChatClient.channels.history('roomIdNumber', {}, function(err, body) { if(err) console.log(err); else console.log(body); }); });

Maybe I'm doing this wrong? Login returns ok result, the following call gives:

{ RequestError: The parameter "roomId" or "roomName" is required [error-roomid-param-not-provided]
at Request.clientRequest [as _callback] (/home/wesley/rocketchat-ddp-listener/node_modules/rocketchat/lib/net.js:146:38)
at Request.self.callback (/home/wesley/rocketchat-ddp-listener/node_modules/request/request.js:187:22)
at Request.emit (events.js:198:13)
at Request. (/home/wesley/rocketchat-ddp-listener/node_modules/request/request.js:1044:10)
at Request.emit (events.js:198:13)
at IncomingMessage. (/home/wesley/rocketchat-ddp-listener/node_modules/request/request.js:965:12)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19) name: 'RequestError', statusCode: 400 }

Placing the channel.history call outside of the login function callback gives me a not authenticated error as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant