Configure the settings for your account
You can programmatically configure the settings for your account, such as the callback URLs that the webhooks will use.
Example
This example shows how to set the URL that will be called when your Vonage number receives an SMS.
| 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). |
SMS_CALLBACK_URL | The publicly-accessible URL that Vonage should send information to when your Vonage number receives an SMS |
Run your code
Save this file to your machine and run it:
Prerequisites
Create a file named configure-account.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 ConfigureAccount 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 ConfigureAccount:
Prerequisites
Add the following to build.gradle:
Create a file named ConfigureAccount 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 ConfigureAccount:
Prerequisites
Create a file named ChangeAccountSettings.cs and add the following code:
Add the following to ChangeAccountSettings.cs:
Prerequisites
Create a file named configure-account.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 configure-account.rb and add the following code:
Run your code
Save this file to your machine and run it:
The example outputs the current settings of your account, after it was updated with the new URL.