npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/nexmo_account

v3.0.0

Published

DataFire integration for Account API

Downloads

5

Readme

@datafire/nexmo_account

Client library for Account API

Installation and Usage

npm install --save @datafire/nexmo_account
let nexmo_account = require('@datafire/nexmo_account').create({
  username: "",
  password: ""
});

.then(data => {
  console.log(data);
});

Description

Enables users to manage their Vonage API Account by programmable means. More information is available here: https://developer.nexmo.com/account/overview.

Actions

getAccountBalance

Retrieve the current balance of your Vonage API account

nexmo_account.getAccountBalance({
  "api_key": "",
  "api_secret": ""
}, context)

Input

  • input object
    • api_key required string: Your Vonage API key. You can find this in the dashboard
    • api_secret required string: Your Vonage API secret. You can find this in the dashboard

Output

changeAccountSettings

Update the default webhook URLs associated with your account:

  • Callback URL for incoming SMS messages
  • Callback URL for delivery receipts

Note that the URLs you provide must be valid and active. Vonage will check that they return a 200 OK response before the setting is saved.

nexmo_account.changeAccountSettings({
  "api_key": "",
  "api_secret": ""
}, context)

Input

  • input object
    • api_key required string: Your Vonage API key. You can find this in the dashboard
    • api_secret required string: Your Vonage API secret. You can find this in the dashboard
    • drCallBackUrl string: The webhook URL that Vonage makes a request to when a delivery receipt is available for an SMS sent by one of your Vonage numbers.
    • moCallBackUrl string: The default webhook URL for inbound SMS. If an SMS is received at a Vonage number that does not have its own inbound SMS webhook configured, Vonage makes a request here.

Output

topUpAccountBalance

You can top up your account using this API when you have enabled auto-reload in the dashboard. The amount added by the top-up operation will be the same amount as was added in the payment when auto-reload was enabled. Your account balance is checked every 5-10 minutes and if it falls below the threshold and auto-reload is enabled, then it will be topped up automatically. Use this endpoint if you need to top up at times when your credit may be exhausted more quickly than the auto-reload may occur.

nexmo_account.topUpAccountBalance({
  "api_key": "",
  "api_secret": "",
  "trx": ""
}, context)

Input

  • input object
    • api_key required string: Your Vonage API key. You can find this in the dashboard
    • api_secret required string: Your Vonage API secret. You can find this in the dashboard
    • trx required string: The transaction reference of the transaction when balance was added and auto-reload was enabled on your account.

Output

retrieveAPISecrets

Retrieve API Secrets

nexmo_account.retrieveAPISecrets({
  "api_key": ""
}, context)

Input

  • input object
    • api_key required string: The API key to manage secrets for

Output

  • output object
    • _embedded object: The single secrets key returns an array of API secrets
      • secrets array: Array of API secrets
    • _links secretMgmtLinks

createAPISecret

Create API Secret

nexmo_account.createAPISecret({
  "api_key": "",
  "body": {
    "secret": ""
  }
}, context)

Input

  • input object

Output

revokeAPISecret

Revoke an API Secret

nexmo_account.revokeAPISecret({
  "api_key": "",
  "secret_id": ""
}, context)

Input

  • input object
    • api_key required string: The API key to manage secrets for
    • secret_id required string: ID of the API Secret

Output

Output schema unknown

retrieveAPISecret

Retrieve one API Secret

nexmo_account.retrieveAPISecret({
  "api_key": "",
  "secret_id": ""
}, context)

Input

  • input object
    • api_key required string: The API key to manage secrets for
    • secret_id required string: ID of the API Secret

Output

Definitions

ErrorAPIKeyNotFound

  • ErrorAPIKeyNotFound object: This API key was not recognised
    • detail required string: More detail regarding this error, including the API key supplied
    • instance required string: Internal Trace ID
    • title required string: Description of the error
    • type required string: URL for further information

ErrorAuthenticationFailed

  • ErrorAuthenticationFailed object: Authentication Failed

ErrorAuthenticationFailedAccountBalance

  • ErrorAuthenticationFailedAccountBalance object: Authentication Failed

ErrorAutoReloadNotEnabled

  • ErrorAutoReloadNotEnabled object: Auto-Reload not enabled

ErrorSecretIDNotFound

  • ErrorSecretIDNotFound object: This secret ID was not recognised
    • detail required string: More detail regarding this error, including the secret ID supplied
    • instance required string: Internal Trace ID
    • title required string: Description of the error
    • type required string: URL for further information

accountBalance

  • accountBalance object
    • autoReload boolean (values: true, false): Whether the account has auto-reloading enabled
    • value number: The balance of the account, in EUR

accountSettings

  • accountSettings object
    • dr-callback-url string: The current or updated delivery receipt webhook URI
    • max-calls-per-second integer: The maximum number of API calls per second.
    • max-inbound-request integer: The maximum number of inbound messages per second.
    • max-outbound-request integer: The maximum number of outbound messages per second.
    • mo-callback-url string: The current or updated inbound message webhook URI

accountSettingsRequest

  • accountSettingsRequest object
    • drCallBackUrl string: The webhook URL that Vonage makes a request to when a delivery receipt is available for an SMS sent by one of your Vonage numbers.
    • moCallBackUrl string: The default webhook URL for inbound SMS. If an SMS is received at a Vonage number that does not have its own inbound SMS webhook configured, Vonage makes a request here.

createSecretRequest

  • createSecretRequest object
    • secret required string: The new secret must follow these rules:

secretInfo

  • secretInfo object
    • _links secretMgmtLinks
    • created_at string: Creation date/time for this secret
    • id string: Secret ID

secretMgmtLinks

  • secretMgmtLinks object: Links related to this resource
    • self object: This resource
      • href string: The URI for this resource

success

  • success object

topupRequest

  • topupRequest object
    • trx required string: The transaction reference of the transaction when balance was added and auto-reload was enabled on your account.