Kotlin code samples for Vonage APIs using the Kotlin Server SDK. These are used in the Vonage developer portal.
Quickstarts also available for:
See the Getting Started guide if you are new to Vonage for an overview.
To use this sample you will first need a Vonage account. For some of the examples you may need to buy a number. Most APIs will require you to create an application.
- Clone or download the repo (see the green
Code
button above). - Open the project in your IDE - IntelliJ IDEA or Visual Studio Code are recommended.
- Run
gradlew assemble
to build the project.- To work with a local copy of the SDK or any of its dependencies, run
mvn install
from the respective repo. - To work with a different / specific version of the SDK or any dependencies, edit the
build.gradle.kts
file.
- To work with a local copy of the SDK or any of its dependencies, run
- Copy
.env-example
to.env
and edit the values. The EnvironmentVariables.kt file is where they're loaded. - Use your IDE to run the examples you are interested in.
You will need to point the run configuration to use the
.env
file as an environment variable.
See SNIPPETS.md for an aggregated list of all the code in this repository. You can then Ctrl+F search this file to find what you're looking for.