0

How do you batch mids when calling MoveMessages or DeleteMessages?

I can move or delete one message at a time just fine.
auth.callWebService({  url: 'http://mail.yahooapis.com/ws/mail/v1.1/jsonrpc',  method: 'POST',  headers: ['Content-Type:application/json'],  parameters: {},  body: JSON.stringify({    method: 'MoveMessages',    params: [{      sourceFid: folderId,      destinationFid: 'Trash',      mid: messageId    }]  })}, 

But putting in an array of messages (all of which are in the same source folder) doesn't work.
 
auth.callWebService({  url: 'http://mail.yahooapis.com/ws/mail/v1.1/jsonrpc',  method: 'POST',  headers: ['Content-Type:application/json'],  parameters: {},  body: JSON.stringify({    method: 'MoveMessages',    params: [{      sourceFid: folderId,      destinationFid: 'Trash',      mid: [messageId1, messageId2, ...]    }]  })}, onDeleted);

The docs say that the mid parameter is repeatable, so I'm probably just not doing it right. Anyone know the correct way?
Thanks!

by
1 Reply
  • Here is a sample json body:
    {"method":"MoveMessages","params":[{"mid":["2_0_0_1_2696_AJfPjkQAAYOjTCrTbAt7PD01I7Q","2_0_0_1_1355_AJfPjkQAAVx0TH9AEwqVcAbHTLQ","2_0_0_1_2158_AJfPjkQAAU03TGxkTAbZYXR6IVw"],"sourceFid":"Inbox","destinationFid":"Trash"}]}

    Please see if your request has the same format.
    0

Recent Posts

in Yahoo! Mail Web Services API