Skip to content

rocketChatClient.channels.history bad request #85

@starhound

Description

@starhound

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions