okland / accounts-phone

A login service based on mobile phone number for Meteor
117 stars 87 forks source link

Twilio problem #13

Open Animion opened 8 years ago

Animion commented 8 years ago

I know there's closed issue with this symptoms, but my SID is correct and there's stil an error:

I20151027-06:46:27.155(1)? Exception in callback of async function: Error: [object Object] [Error sending SMS ] I20151027-06:46:27.157(1)? at packages/okland_accounts-phone/packages/okland_accounts-phone.js:81:1 I20151027-06:46:27.157(1)? at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

hazourano commented 8 years ago

i have the same issue. i am following whatsapp clone tutorial. i tried replacing the credential with valid sid and token . tried creating settings.json and also include the credential in sms.js

glrodasz commented 8 years ago

I think is related with this others comments. https://github.com/okland/accounts-phone/issues/7 Something is wrong, and will be nice a more descriptive error, because if you try to put a console log just show undefined.

veeramarni commented 8 years ago

I have forked this repo and fixed this issue. Checkout veeramarni:accounts-phone. @okland let me know if i can push the changes.

okland commented 8 years ago

@veeramarni I added you as a collaborator to this project so you can push the changes, if they fix the problems :).

veeramarni commented 8 years ago

@okland added my changes, please check the diff

beeekind commented 8 years ago

Was this issue ever resolved? I'm getting the same error, also via the tutorial for building a whatsapp clone for meteor + ionic.

tixastronauta commented 8 years ago

I'm having the same problem. @veeramarni can you please explain how can I use your package?

veeramarni commented 8 years ago

By adding template with working twilio number and it should work (don't have to use mine).

By default it uses +9729999999 and it fails with an twilio error. SMS.phoneTemplates = { from: '+9729999999', text: function (user, code) { return 'Welcome your invitation code is: ' + code; } };

ChenLi0830 commented 8 years ago

Thanks @veeramarni , it worked for me!

To be more specific, I put the SMS.phoneTemplates code block in Meteor.startup like this:

Meteor.startup(function () {
        SMS.twilio = {
            FROM: 'yourNumber',
            ACCOUNT_SID: 'yourSID',
            AUTH_TOKEN: 'yourToken'
        };
        SMS.phoneTemplates = {
            from: 'yourNumber',
            text: function (user, code) {
                return 'Welcome your invitation code is: ' + code;
            }
        };
tixastronauta commented 8 years ago

Thanks a lot @veeramarni! It worked perfectly :+1:

vohtaski commented 8 years ago

same problem here, is it possible to do a new release with this change please

atulmy commented 8 years ago

Our saviour @veeramarni! :+1: