Code Monkey home page Code Monkey logo

Comments (6)

pvela avatar pvela commented on July 28, 2024

What "FROM" number are you using to send this message?

Some of the constraints to be aware of :

New accounts can only send to numbers that have been verified in the dashboard, and 'Nexmo Demo' will be added to all messages. Once you've added funds to your account, those restrictions will be removed.

from vonage-node-sdk.

diegoaguilar avatar diegoaguilar commented on July 28, 2024

Well I'm using a placeholder text as the "FROM" number, and eventhough I've not purchased any numbers, I've already bought credits.

I achieved sending SMS with this code:

function requestSMS(key, secret, text, from, to, options) {
  options = options || {};
  var post = {
    api_key: key,
    api_secret: secret,
    from: from,
    to: to,
    text: text.toString(),
  };
  if (options.debug) {
      winston.debug('About to send SMS from % to %', from, to);
      winston.debug(post);
  }

  request.post(
    'https://rest.nexmo.com/sms/json',
    { form: post },
    (err, httpResponse, body) => {
    if (err && options.debug) {
      winston.debug('Request to send SMS failed');
      winston.debug(err);
    } else if (options.debug) {
      winston.debug(body);
    }
  });
}

from vonage-node-sdk.

pvela avatar pvela commented on July 28, 2024

Are you saying that you were able to send a message using the direct API call and its not working with the NPM package easynexmo with the same set of parameters (key, secret, from and to)?

from vonage-node-sdk.

diegoaguilar avatar diegoaguilar commented on July 28, 2024

Yep, exactly that :(
On Mar 2, 2016 12:29 AM, "prabhu" [email protected] wrote:

Are you saying that you were able to send a message using the direct API
call and its not working with the NPM package easynexmo with the same set
of parameters (key, secret, from and to)?


Reply to this email directly or view it on GitHub
#32 (comment).

from vonage-node-sdk.

diegoaguilar avatar diegoaguilar commented on July 28, 2024

@pvela any opinions or suggestions?

from vonage-node-sdk.

pvela avatar pvela commented on July 28, 2024

@diegoaguilar Tried many times but couldn't replicate the problem. After taking a closer look at your output from the initial paste it looks like you are connecting to port 80, which is not the correct port to connect to. Can you verify if you are using the latest version of the library and check if you have overwritten the port from 443 to 80.

from vonage-node-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.