node-authy icon indicating copy to clipboard operation
node-authy copied to clipboard

Addition custom actions and locale params for request_sms and request_voice

Open RobWelbourn opened this issue 7 years ago • 1 comments

@josh-authy In addition to the force parameter, it would be useful to include the optional parameters action, action_message and locale to the request_sms and request_voice methods.

RobWelbourn avatar Nov 10 '18 21:11 RobWelbourn

I totally agree, we've been hacking the code in order to force the call to be performed in English. Do you think you could republish a package with this slight modification?

Authy.prototype.request_call = function (id, force, callback) {
    var qs = {};

    if (arguments.length > 2) {
        qs.force = force;
    } else {
        callback = force;
    }
    qs.locale = 'en' ;

    this._request("get", "/protected/json/call/" + querystring.escape(id), {}, callback, qs);
};

Thanks a mil

Do you want a PR?

manumouton avatar Dec 03 '18 13:12 manumouton