-
Notifications
You must be signed in to change notification settings - Fork 26
Passing in a client object to send SMS does not work #8
Comments
I have tested. var catapult = require("node-bandwidth");
catapult.Client.globalOptions.userId = "u-xxxxx";
catapult.Client.globalOptions.apiToken = "t-xxxxx";
catapult.Client.globalOptions.apiSecret = "xxxxxx";
catapult.Message.create( {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
if(err){
return console.error("Error: %s", err);
}
console.log(message);
}); And var catapult = require("node-bandwidth");
var client = new catapult.Client("u-xxxxx", "t-xxxxx", "xxxxx");
catapult.Message.create(client, {to: "+12520000000", from: "+1910000000", text: "test"}, function(err, message){
if(err){
return console.error("Error: %s", err);
}
console.log(message);
}); Both pieces of code work fine.
|
Could you try it again with node 0.10.x? It isn't working for me either. I
|
Node 0.10.38. Same result |
I was basing my previous comment off memory. |
Okay, this actually is working for me now. I'm not sure what was different when it didn't work before. Thanks guys! |
The
README.md
states that one should be able to create aclient
object and pass it into any of the methods to make API calls like this:This does not work. Only using the global
client
object, does sending SMS actually work.The text was updated successfully, but these errors were encountered: