question

Lior Gerson avatar image
Lior Gerson asked ·

JavaScript (Node) - How do i get messageStore list using multiple message types?

Hello,

I'm using ringcentral-ts in my node application.

Trying to get messageStore for SMS and VoiceMail only by ringCentral.account().extension(extentionId).messageStore().list(params)


In params, there is a property called messageType which defined as:


/**

* The type of the resulting messages. If not specified, all messages without message type filtering are returned. Multiple values are accepted

*/

messageType?: 'Fax' | 'SMS' | 'VoiceMail' | 'Pager' | 'Text';


My question is how do i actually query for multiple types?

(There is a compilation error if i'm trying to put multiple values for messageType)


Thanks!



message-storenodets
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

Simply put them in an array ["Fax", "SMS"] etc.

Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Lior Gerson avatar image
Lior Gerson answered ·

Phong, thanks for your reply.

Unfortunately i can't use an array because of messageType definition:


2 comments Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

What SDK and language are you using? Looks like Java but not sure if you are using our SDK.

If you are using our SDK, here is the way to create the params

ListMessagesParameters parameters = new ListMessagesParameters();
parameters.messageType = new String[] {"VoiceMail", "Fax", "SMS};
...


0 Likes 0 · ·

I'm using RingCentral for Typescript - https://github.com/zengfenfei/ringcentral-ts/

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.