Skip to content

Instantly share code, notes, and snippets.

@dwcaraway
Created November 14, 2018 22:25
Show Gist options
  • Save dwcaraway/3230c0749c1d34455dc83fee5fabd0d4 to your computer and use it in GitHub Desktop.
Save dwcaraway/3230c0749c1d34455dc83fee5fabd0d4 to your computer and use it in GitHub Desktop.
example for tenet3 voyager API
var Voyager = require('voyager');
var defaultClient = Voyager.ApiClient.instance;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['api_key'] = "Token"
var api = new Voyager.OpportunityApi()
var oppId = 789; // {Number} ID of opportunity to return
var apiKey = "apiKey_example"; // {String} Your API key
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: %j', data);
}
};
api.getOppById(oppId, apiKey, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment