-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Labels
type: docs updatedocumentation change not affecting the codedocumentation change not affecting the codetype: questionquestion directed at the libraryquestion directed at the library
Description
Hello, I'm facing a wrong behaviour using the twilio-node sdk. If I try to retrieve the messages list from a channel setting a pageSize value, let's say equal to 25, the result contains all the messages like if the pageSize option is ignored.
I tried using the REST api instead, specifying the ?PageSize=25
param, and all works fine since I get the first 25 messages and the link for the next page and so on.
How can I solve this? Thanks.
Is there also a way to specify the starting page?
Thanks,
Simone
Version:
3.30.3
Code Snippet
const twilio = require('twilio');
const accountSid = 'acc sid';
const apikey_sid = 'apikey sid';
const apikey_secret = 'apikey secret';
const client = new twilio.Twilio(apikey_sid, apikey_secret, { accountSid: accountSid });
client.chat
.services('serviceSid')
.channels(encodeURIComponent('channelSid'))
.messages
.list({pageSize: 25})
.then(ch => console.log("CHANNEL:", ch))
.catch(err => console.error("ERR:", err));
Metadata
Metadata
Assignees
Labels
type: docs updatedocumentation change not affecting the codedocumentation change not affecting the codetype: questionquestion directed at the libraryquestion directed at the library