Search code examples
jsonapisendbird

SendBird GET Request Api for retrieve previous messages not working properly


Im using SendBird platform API to create chat in my website, when i try to retrieve the previously send messages in a channel using below API:

https://api.sendbird.com/v3/{channel_type}/{channel_url}/messages

METHOD : GET

Request: ?message_ts=long(Required)&prev_limit=int(Optional, default: 15, 0~200)&next_limit=int(Optional, default: 15, 0~200)&include=boolean(Optional, default: true)&reverse=boolean(Optional, default: false)&custom_type=string(Optional)&message_type=string(Optional)&sender_id=string(Optional)

after passing value to above request,im getting an error saying

{ "message": "Not authorized. Get messages function can be called only from Park or Enterprise plan.", "code": 400108, "error": true }

can some one please help me with this

Thanks Nithin


Solution

  • The Message Retrieval API which you are calling is a premium feature as you can see in Senbird's Pricing Page.

    You will have to contact Sendbird and upgrade to their premium plan in order to retrieve message and successfully call the endpoint.