-
Notifications
You must be signed in to change notification settings - Fork 73
With twilio API in vuejs2 app I got error client.on is not a function #151
Comments
Hi, looking at your code, I think you might have mixed server side Node.js code: const client = new Twilio( with the calls to a Chat Client: client.on("tokenAboutToExpire", async () => { // Error line The Chat Client gets initialized with an access token - your front end code does not get your Twilio Account Credentials. |
Hello,
"axios": "^0.19.0",
|
Hello, |
I try to run this https://www.twilio.com/docs/libraries/node example In my first attempts I used twilio parameters of my client. Please dont worry that it is unsafe - that is not working account and in src/App.vue I added twillio code with parameters by button click :
and I got error in the browsers console : https://imgur.com/a/YI1aeg6 In my package.json :
Thanks! |
I tried to debug this issue in Twilio.js:258 and found : and ref to undefined element and I see ref 10 years old I tried version of twilio 3.54.1 (latest) and 3.54.0 |
I want to use twilio API in my vuejs2 app looking at demo https://github.com/TwilioDevEd/sdk-starter-node:
I got client object with Twilio credentials, but next I want to assign tokenAboutToExpire with code like :
and got error:
and in the console I see that I have client and client.chat : https://prnt.sc/w4frzp
What is wrong?
Is it invalid client object?
Thanks!
The text was updated successfully, but these errors were encountered: