Reputation: 1
I'm trying to build an RTM application using agoraRTM signalling ( with Django, html, and basic js ) but all i got is errors. I downloaded the sdk from the agora.io and started with some basic code to see if it's working or not and apparently it is not working.
rtmClient = AgoraRTM.createInstance(APP_ID)
async function startRtm() {
try {
await rtmClient.login({ token: TOKEN, uid: USER_ID });
console.log('AgoraRTM client login successful');
} catch (err) {
console.error('Error occurs at login:', err);
return;
}
}
// Call the async function to start RTM
startRtm();
when open the web page all it gives me is
TypeError: AgoraRTM.createInstance is not a function
When I try this snippet :
rtmClient = AgoraRTM.RTM(APP_ID)
It renders an error saying that
Cannot call a class as a function or sometimes I have a problem with appID
Can anyone help or provide some kind of documentation because I've tried some sources but none of it seem to work.
I've tried to look in agora.io documentation doesn't seem to work, the npm documentation as well...
Upvotes: 0
Views: 320
Reputation: 1
Change version. I download signaling sdk latest version and it didnot work. When I download version 1.5.1 it works.
Upvotes: 0