Hello, I use flutter sdk but there no function for channel unread count like this docs , so I want use your API, can you provide the endpoint name that should be used?
@AmityAsk You can use the following API endpoint to retrieve the channel unread count: Channel Unread Count Endpoint.
If you have any other questions or need further assistance, feel free to ask!
Hi @amitysupport thanks for the reply.
And now I want to Mark Channel as Read via API, can you provide the endpoint name again for that feature? Thanks
Hello, you can access all the APIs related to unread count here: Amity API. Please note that it’s not feasible to implement this using both the API and SDK simultaneously.
I always get a response
{
"status": "error",
"message": "Not found",
"code": 500000,
"data": {}
}
from API Mark all messages in channel as read
Hello @AmityAsk , Let me pass this to our team for checking, and I’ll get back to you.
Hello, could you please try the below sample:
curl --location --request PUT 'https://api.us.amity.co/api/v1/markers/channels/6667e5966e40f87c2f5b7ef0/mark-read' \
--header 'accept: application/json, text/plain, */*' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Ikxxxx'
Hi,
I’m trying to get the unread count for channels but this endpoint gives only one marker without indication of a specific channel. How can I know for which channel the unread count applies to?
I also tried the API Amity API but it sends the error 403 Forbidden for a user that belongs to the channel and has the role “channel-moderator”. Would you know why?
Thank you for your help!
Hello @cedBYW , For your issue, please provide the following information for further check:
- Full cURL request and response
- Channel type
I actually solved this issue by fetching the channel users and using the readToSegment.
Thank you