I am following this tutorial https://www.twilio.com/docs/chat to integrate simple chat into my ASP.NET Core application. I don't understand where are messages from chat stored. Are they stored on Twilio server or I should manually store messages on my backend?
I have found two repositories with relevant code:
https://github.com/TwilioDevEd/sdk-starter-csharp - when I start chat with this project, clients are able to chat, but new client is not able to see old messages
https://github.com/TwilioDevEd/twiliochat-csharp - this code can start, but it is not possible to send messages with error code
WebSocket connection to 'wss://tsock.twilio.com/v2/wsconnect?token=eyJj...' failed: Error during WebSocket handshake: Unexpected response code: 503
Chat history is maintained unless you delete it. You can view chat history by joining an existing Twilio Programmable Chat channel which was used before.
You can also view the Chat history using the respective API's.
Read multiple Message resources
Related
I'm trying to create a bot to send and receive messages through Google Chat and I wanted to know if there is any way I can retrieve messages using the webhooks? If not, is there anyway I can request the messages in the chat API without an public IP?
NOTE: if there isn't, I have read the https://developers.google.com/chat/how-tos/service-accounts and I wanted to understand: if I setup a Flask server, will google be able to send me the push notifications back, or do I need a public IP?
I have solved the problem.
There is no way, you must register on google as a developer.
Sorry for taking so long to post the solution
I have implemented a chat feature in my application, but the issue I am facing is the screen does not refresh automatically if the user gets a message.
I looked for several options on the internet, but all I could find is paid services or using firebase.
Is there any free option to implement it without using firebase?
I want to refresh my chat screen instantly the message is received from the other side.
We have social networking website which has a messenger module ( Chat with friends ) which is implemented in JQUERY, PHP and HTML with mysql. Now we are creating Mobile app of this Messenger module. So we decided to go to Ionic framework.
Now my problem is As we did R&D, We need to use GCM or FCM for smooth running of messenger with background service for real time chat and for push notification.
So my query is, If we use GCM or FCM, And one user has app and another user on website,
Then how they can communicate via GCM or FCM?
Another approach is we don't use GCM or FCM, Create REST API on server for Messenger app and call that API in background for messenger.
So which one is good approach?
If we use REST API then can you please share any example of this type, We are not able to find on google.
Please share your thoughts, We are struggling from last 7 days on this.
You will need to use websockets
on the client side socket.IO is a godd library ) , you need to connect to a socket server ( in php Rachet is a good one ) once the connection is open , you will basically have an exposed client side method ( function ) that the server can directly trigger.
eg: you have a chat window : two people connect
1) person A sends a message to the server
2) The server receives this new messages, the triggers a broadcast to the socket server
3) The broadcast calls newMessage( messageText ) on the client ( Person B )
4) All the connected clients then display the new message
you can also have private channels ( for chat rooms )
This is a VERY high level description of my understanding of web sockets ( you should go and do some more research on websockets, but this is a starting point )
I was thinking of using the quickblox for my chat requirement.
We want to build a 1-1 chat between a user and admin. User will be logged in from the android and admin will be logged in from the web. We want the functionality for the user to chat with an admin person. Our backend code base is in PHP and both the android and web talks to the backend with rest APIs.
Some can please help me out on where should I start my development from. Can you share any sample code or tutorial to get me started with, it would be really helpful?
It may be solve like this
For PHP admin side
First you need to create the dialog for all the user
Then for selected user you will call the Retrieve_messages api for getting all the user
For sending the message you have to call Create_message
Ref : QuickBlox
For android they have their own SDK for sending and getting the message
Android SDK
i wrote a java program to connect with google talk using smack api
connection and sending receiving messages are working fine
then how can i get the chat history using smack api
there is one method AgentchatHistory in smack but how can i use it
I believe AgentChatHistory is to support Openfire's feature call fastpath. Don't think Google supports that. If you want chat history, you will have to implement it.