Closed PaoDLR closed 2 years ago
You need to involve all usernames in a list in the "usernames" field. Take a look at the example here: https://rest.chatengine.io/#4a596036-fd7c-4539-b913-52990c7847f9
Please let me know if this helps - it should 👍
You need to involve all usernames in a list in the "usernames" field. Take a look at the example here: https://rest.chatengine.io/#4a596036-fd7c-4539-b913-52990c7847f9
Please let me know if this helps - it should 👍
Hey alamorre!
I have tried to include all usernames in the "usernames" field, but it does not do what I intend for it to do sadly and it also gives me a 403 error despite the correct project-id, user-name, and user-secret
The project that I have been trying to do is a mobile application, and I want to render the chat feed only; without looking at the chat list and selecting which user to chat with.
Is that possible? For it to render solely the chat feed of two users despite having multiple active chats?
For inquires about using just the chat feed I would open a separate GitHub issue
This code snippet is rather long and confusing. Just try the getOrCreateChat call with just the code of interest and share it here
Copy this format but with your own HARDCODED values to test:
var axios = require('axios');
var data = '{\n "usernames": ["adam_la_morre", "bob_baker", "wendy_walker"],\n "title": "Another Surprise Party!",\n "is_direct_chat": false\n}';
var config = {
method: 'put',
url: 'https://api.chatengine.io/chats/',
headers: {
'Project-ID': '{{project_id}}',
'User-Name': '{{user_name}}',
'User-Secret': '{{user_secret}}'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Following up - did any of this help?
Hi!
I've been trying to develop a mobile application where if a user clicks on the button on someone else's user profile, it will render the Chatengine chat between the currently logged-in user and the user of the current profile they are viewing.
Is that possible?
Here's how my code looks like. I've extracted the current chat_id of the chat between the two users and tried to render a chat between them only, but sadly it doesn't work. Any tips?
Any help would be greatly appreciated. Thanks!