cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1246
Views
1
Helpful
2
Replies

.net API getmessages returns all messages

john.barthle1
Level 1
Level 1

Hello all,

I am working on an app to retrieve a list of messages in a users' unity inbox.  I am using the ReST .net Unity SDK in C#.  When I call the GetMessages method of the UserMessage class, I am specifying the page that I want returned and the number of messages per page that I want returned.

No matter what parameters I specify, GetMessages returns all the messages.

Example:

var res = UserMessage.GetMessages(connectionServerInbox, ObjectId, out oMessages, 1, 5, MessageSortOrder.NEWEST_FIRST, MessageFilter.None, MailboxFolder.inbox);

According to the API in this example oMessages should contain the first 5 messages for the user that I selected.  Instead it has all 27 messages.

Any insight to what I'm doing wrong would be appreciated.

Regards,

John B.

2 Replies 2

stephan.steiner
Spotlight
Spotlight

While I can't give you a solution.. the first thing I usually do if something doesn't work as expected is fire up fiddler, and look at what request is really sent over the wire, then compare that with the definition of the API. Extraction sounds like a GET so that's something you can even replay in the browser.

Thanks Stephan,

I will give that a try.

Regards,

John