ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

API Changes #237

Closed ganeshaskan closed 2 years ago

ganeshaskan commented 3 years ago

Hi,

I am using the API URL ( https://api.connectycube.com/users/by_login) to get user details. It is working fine until a day before. But right I am getting "User not found" error message. Please let me know is there any changes on API. How to resolve this issue.

Thanks

DaveLomber commented 3 years ago

@ganeshaskan could you please provide a log of request and response data

This will help us find a root cause

Use this code snippet to get SDK logs https://developers.connectycube.com/reactnative/?id=configuration

ganeshaskan commented 3 years ago

Hi,

Here I attached the request and response as screenshot. It works previously but couple of days before only this login API its not working. In the screenshot login details I given is the valid one. But the response shows as "user not found". Kindly let me know is there any changes in API.

Please give as input to fix this

request response

DaveLomber commented 3 years ago

Please let us know 2 things:

banshiAnton commented 3 years ago

HI @ganeshaskan maybe you have error in php Please try to use

'login='.$email;

or

"login=$email"; // double quotes
ganeshaskan commented 3 years ago

Hi,

I tried both you mentioned format but still I am getting same "user not found" error.

APP ID : 3496 login field I given teststudent100520211236@taylorrobinsonmusic.com

Thanks

banshiAnton commented 3 years ago

can you please show final builded request with url,query params,headers,body maybe with curl-getinfo or other tools

ganeshaskan commented 3 years ago

Hi,

Below is the information I get when curl_getinfo used. info_header

Thanks

banshiAnton commented 3 years ago

try to use this

curl_setopt($ch, CURLOPT_URL, 'https://api.connectycube.com/users/by_login?login='.$email);

later we deploy changes and you can use

curl_setopt($ch, CURLOPT_POSTFIELDS, 'login='.$email);
DaveLomber commented 3 years ago

@ganeshaskan we have applied a patch so it should work as before, please check

ganeshaskan commented 3 years ago

Hi,

Now by_login API is working fine. Thank you so much.

Please let us know is there any changes on the API (https://api.connectycube.com/chat/Message). This also worked previously but now not working. We are sending chat messages by using this API. chat_dialog_id, recipient_id and message parameters are sending properly. But chat not received. Below is the code we used works earlier.

We got the error message as "max validation failed on message"

Kindly let us know any changes on this API.

$arr = array("chat_dialog_id"=>$chat_dialog_id,"message"=>$message,"recipient_id"=>$recipient_id); $json = json_encode($arr); curl_setopt($ch, CURLOPT_URL, 'https://api.connectycube.com/chat/Message'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); //curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); $headers = array(); $headers[] = 'Content-Type: application/json'; $headers[] = 'CB-Token: '.$token; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $result_chat = curl_exec($ch);

Thanks

DaveLomber commented 3 years ago

@banshiAnton please check as well

DaveLomber commented 3 years ago

@ganeshaskan we have max:4000 validation for message field. What string you send?

ganeshaskan commented 3 years ago

Hi,

We sent chat message early having more number of characters. Please let me know why restrictions happens now. Is Possible to increase message chars.

Thanks

DaveLomber commented 3 years ago

@ganeshaskan there must be some limit anyway at server side. What max length are you sending?

ganeshaskan commented 3 years ago

Hi,

We are sending messages as html content. So it should be more than 4000 chars. Previously all contents looks good. But, due to char restriction messages not received now. How to overcome this. Kindly let me know

Thanks

DaveLomber commented 3 years ago

@ganeshaskan will 8K will be ok?

ganeshaskan commented 3 years ago

Hi,

Yes please change it and let me know. We will check

Thanks

DaveLomber commented 3 years ago

We set it to 8K please check

ccvlad commented 2 years ago

Closed due to inactivity. Please create a new issue if needed.