function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ugougo 

Page parameter in User Messages does not seem to work

I am sending a GET request to /chatter/users/userId/messages. According to the documentation, one of the request parameters is "page" which "specifies the number of the page you want returned".

 

I tried to use both 0 and 1 for "page" and I always get the error response:

 

GET Bad Request
INVALID_PAGING_OPTION Page value malformed: 0 [or 1]

 

What are the valid values for the "page" parameter?

 

Thank you,

Ugo

alouie_sfdcalouie_sfdc

Sorry, the documentation is incorrect and will be fixed. When you GET /chatter/users/userId/messages, the nextPageUrl in the response payload will tell you what to use for the page parameter. It's an opaque paging token that you should use as provided. The other request parameter, pageSize, is an Integer as described in the API documentation.

jashjash
Hi - I've tried using the nextPageURL and it always returns a 400 "bad request" error.  Am I doing something wrong in the subsequent request?  I haven't been able to find any other topics related to this issue... thanks much for the help.  

INITIAL REQUEST:
    https://na6.salesforce.com/services/data/v29.0/chatter/feeds/record/0F9800000000266CAA/feed-items

EXCERPT FROM RESPONSE:
"nextPageUrl" : "/services/data/v29.0/chatter/feeds/record/0F9800000000266CAA/feed-items?page=2014-02-06T04%3A52%3A11Z%2C0D580000013UegyCAC"

REQUEST FOR NEXT PAGE RETURNS 400 ERROR:
    https://na6.salesforce.com/services/data/v29.0/chatter/feeds/record/0F9800000000266CAA/feed-items?page=2014-02-06T04%3A52%3A11Z%2C0D580000013UegyCAC