Get your current account balance
You can check the balance of your Vonage account at any time by making an API request and receiving the balance of your account in the response.
| Key | Description |
|---|---|
VONAGE_API_KEY | Your Vonage API key (see it on your dashboard). |
VONAGE_API_SECRET | Your Vonage API secret (also available on your dashboard). |
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named account-balance.js and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Add the following to build.gradle:
Create a file named GetBalance and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.kt.account with the package containing GetBalance:
Prerequisites
Add the following to build.gradle:
Create a file named GetBalance and add the following code to the main method:
Run your code
We can use the application plugin for Gradle to simplify the running of our application. Update your build.gradle with the following:
Run the following gradle command to execute your application, replacing com.vonage.quickstart.account with the package containing GetBalance:
Prerequisites
Create a file named GetBalance.cs and add the following code:
Add the following to GetBalance.cs:
Prerequisites
Create a file named account-balance.php and add the following code:
Run your code
Save this file to your machine and run it:
Prerequisites
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named get-balance.rb and add the following code:
Run your code
Save this file to your machine and run it:
The example will output the current balance of your account in Euro.