//this is my code to get channel by unique name. It is not giving me any response
client.chat.services(serviceSid)
.channels({uniqueName:'demo'})
.fetch()
.then(channel => console.log(channel));
// this is form sid of channel and it is working
client.chat.services(serviceSid)
.channels('XXXXX')
.fetch
.then(channels=> console.log(channel));
and the reponse is
{
sid: 'CH...................b1e',
accountSid: 'AC...................b71735f',
serviceSid: 'IS..................caa8',
friendlyName: 'demo',
uniqueName: 'demo',
attributes: '{}',
type: 'public',
dat2020-04-21T16:54:52.000Z,
dateUpdated: 2020-04-21T16:54:52.000Z,
createdBy: 'system',
membersCount: 0,
messagesCount: 0,
url: }
in the doc this written in chaneel resource When fetching a Channel resource, the {Sid} value can be either the sid or the unique_name of the Channel resource to fetch. how will i retrive please answer .. i need to complete this project in 3 days ...