Comet Add Users not working


I have been using comet chat pro v2. APIs for add user to a group, add admin to a group, send a custom message were working perfectly fine before few weeks. But, these are showing error message " BAD REQUEST" . Is there any change in APIs? If so, why these are not notified since these will affect the working of app?

Hi @rok.reflections,

Could you let us know whether you are using REST APIs or SDKs for above APIs mentioned by you.
We had checked the REST APIs for add admin/user to a group and send custom message and it was working perfectly fine.

The documentation link that must be referred for the APIs specified by you -

  1. add user/admin to group -
  2. sending custom message -

Also it would be great if you could provide us entire error message.

Warm Regards,
CometChat Team

Hi @siva.nadar,
We are using REST APIs. We were using the APIs(v2) from JAN, and was working perfectly fine. This is message we got for sending custom message :

Client error: POST resulted in a 400 Bad Request response:
{“error”:{“code”:“ERR_EMPTY_CUSTOM_DATA”,“message”:"For the custom category, data must have either non-empty customData (truncated…)

I have tried APIs from the docs you have shared. And now it is working fine. I have found that some requests have been changed. My question is, how we’ll know if there any change in API happens? We donot want to find it out after the app crashes.

Hi @rok.reflections,

The request you have shared has POST body params as a query string. With the security patches added in the recent release API stopped accepting POST params sent in a query string.

There are no changes to inputs and API endpoints since the release of v2.0. The updates to this version only include optimizations and security patches.

We maintain API reference separately for each release so that developers can continue using the older versions.

Warm Regards,

Ketan Yekale
CometChat Pro

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.