twilio / authy-devise

Authy Devise plugin to add Two-Factor Authentication
MIT License
200 stars 84 forks source link

How can I define the text for the verification sms? #78

Closed rept closed 6 years ago

rept commented 7 years ago

Authy supports custom texts through custom_message

curl 'https://api.authy.com/protected/json/phones/verification/start?api_key=XXX' \
-d via='sms' \
-d phone_number='111-111-1111' \
-d country_code=1 \
-d custom_message='Your phone verification pin for Owl Bank is {{code}}'curl 'https://api.authy.com/protected/json/phones/verification/start?api_key=XXX' \
-d via='sms' \
-d phone_number='111-111-1111' \
-d country_code=1 \
-d custom_message='Your phone verification pin for Owl Bank is {{code}}'

I expected this to work like this:

= authy_request_sms_link(:custom_message => t('views.authy.security_code'))

However it doesn't do anything.

senekis commented 6 years ago

Hi @rept,

The example you passed is Phone Verification, that is a different Authy service, but Authy-Devise uses the 2FA api to send the SMS that also support the custom_message param but to get access to this feature you need to contact our sales team.

If you don't have this feature enabled you will get the 60091 Custom message is not allowed error.