About query messages?

Hello and I have another question related to query messages I didn’t need to make pagination just want to get all messages and when I make it without send any thing related to the pagination I got only 20 messages!! so How can make what I told to you ?

Hello, the maximum number of messages you can retrieve within one call is 100 - unfortunately, retrieving all messages in one call is not possible. Pagination is still required.

You can include options[limit]=100 in the request. Please refer to the sample below:


Thank you for that First I already put the options[limit]=100 and still retrieve 20 messages only !! and second question If my position in the first message of the the retrieved data How can get the messages before this message ?
and if my position in the end message of the retrieved data how can get the messages after this message?
and How can know that new message are come?

Please I need the help for answering that because this is mandatory for me so please give me every steps should do to make that with example please

I using you API Services

Hello, could you please assist by providing your sample curls that you use ‘limit’ to our support team email: support.asc@amity.co?

Regarding the position, you can handle pagination using tokens. Please refer to the documentation on how to retrieve the the value by using the pagination: https://docs.amity.co/technical-faq#how-can-i-retrieve-the-next-page-of-data-from-an-api

If the position is in the first message, you can use the ‘prev’ token. If the position is in the last message, you can use the ‘next’ token.

Can I use next or prev without after and before ?

@hossam Yes, you can use next or prev without after and before.