{"id":19123344,"url":"https://github.com/vonage/vonage-java-sdk","last_synced_at":"2025-04-05T21:08:37.909Z","repository":{"id":2256565,"uuid":"3211970","full_name":"Vonage/vonage-java-sdk","owner":"Vonage","description":"Vonage Server SDK for Java. API support for SMS, Messages, Voice, Text-to-Speech, Numbers, Verify (2FA), Video and more.","archived":false,"fork":false,"pushed_at":"2024-05-28T17:03:50.000Z","size":5901,"stargazers_count":93,"open_issues_count":2,"forks_count":119,"subscribers_count":24,"default_branch":"main","last_synced_at":"2024-05-29T04:43:22.291Z","etag":null,"topics":["authentication","dtmf","java","messaging","messaging-api","phone","phone-numbers","server-sdk","sms","sms-api","telecom","two-factor","two-factor-authentication","verification","verify","video-api","voice","vonage","whatsapp"],"latest_commit_sha":null,"homepage":"https://developer.vonage.com/en/home","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vonage.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-01-18T20:12:22.000Z","updated_at":"2024-08-02T12:40:16.432Z","dependencies_parsed_at":"2024-01-17T19:53:17.614Z","dependency_job_id":"cffc0b7b-25f1-4039-8a4d-c01704a3dc5d","html_url":"https://github.com/Vonage/vonage-java-sdk","commit_stats":null,"previous_names":[],"tags_count":81,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vonage","download_url":"https://codeload.github.com/Vonage/vonage-java-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399877,"owners_count":20932876,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","dtmf","java","messaging","messaging-api","phone","phone-numbers","server-sdk","sms","sms-api","telecom","two-factor","two-factor-authentication","verification","verify","video-api","voice","vonage","whatsapp"],"created_at":"2024-11-09T05:25:18.342Z","updated_at":"2025-04-05T21:08:37.903Z","avatar_url":"https://github.com/Vonage.png","language":"Java","readme":"# Vonage Server SDK for Java\n\n![Java](https://img.shields.io/badge/java-8%2B-red)\n[![Version](https://img.shields.io/maven-central/v/com.vonage/server-sdk)](https://central.sonatype.com/artifact/com.vonage/server-sdk)\n[![Build Status](https://github.com/Vonage/vonage-java-sdk/actions/workflows/build.yml/badge.svg)](https://github.com/Vonage/vonage-java-sdk/actions/workflows/build.yml)\n![CodeQL](https://github.com/Vonage/vonage-java-sdk/actions/workflows/codeql.yml/badge.svg)\n[![codecov](https://codecov.io/gh/vonage/vonage-java-sdk/branch/main/graph/badge.svg)](https://codecov.io/gh/vonage/vonage-java-sdk)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Vonage/vonage-java-sdk/badge)](https://scorecard.dev/viewer/?uri=github.com/Vonage/vonage-java-sdk)\n![SLOC](https://sloc.xyz/github/vonage/vonage-java-sdk?)\n[![Snyk](https://snyk.io/test/github/vonage/vonage-java-sdk/badge.svg)](https://snyk.io/test/github/vonage/vonage-java-sdk)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.1%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE.txt)\n[![Pulse](https://img.shields.io/github/commit-activity/m/vonage/vonage-java-sdk)](https://github.com/vonage/vonage-java-sdk/pulse)\n\n\u003cimg src=\"https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg\" height=\"48px\" alt=\"Nexmo is now known as Vonage\" /\u003e\n\nThis Java SDK allows you to use [Vonage APIs](https://developer.vonage.com/api) in any JVM-based application.\nYou'll need to have [created a Vonage account](https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL\u0026utm_medium=github\u0026utm_campaign=java-client-library).\n\n* [Supported APIs](#supported-apis)\n* [Other SDKs](#other-sdks)\n* [Installation](#installation)\n* [Usage](#usage)\n* [Configuration](#configuration)\n* [FAQ](#frequently-asked-questions)\n* [Contribute!](#contribute)\n\n## Supported APIs\n\n- [Account](https://developer.vonage.com/en/account/overview)\n- [Application](https://developer.vonage.com/en/application/overview)\n- [Conversation](https://developer.vonage.com/conversation/overview)\n- [Conversion](https://developer.vonage.com/messaging/conversion-api/overview)\n- [Messages](https://developer.vonage.com/en/messages/overview)\n- [Number Insight](https://developer.vonage.com/en/number-insight/overview)\n- [Number Management](https://developer.vonage.com/en/numbers/overview)\n- [Number Verification](https://developer.vonage.com/en/number-verification/overview)\n- [Redact](https://developer.vonage.com/en/redact/overview)\n- [SIM Swap](https://developer.vonage.com/en/sim-swap/overview)\n- [SMS](https://developer.vonage.com/en/messaging/sms/overview)\n- [Subaccounts](https://developer.vonage.com/en/account/subaccounts/overview)\n- [Verify](https://developer.vonage.com/en/verify/overview)\n- [Video](https://developer.vonage.com/en/video/overview)\n- [Voice](https://developer.vonage.com/en/voice/overview)\n\n## Other SDKs\n\nWe also provide server SDKs in other languages:\n\n- [Kotlin](https://github.com/Vonage/vonage-kotlin-sdk)\n- [.NET](https://github.com/Vonage/vonage-dotnet-sdk)\n- [PHP](https://github.com/Vonage/vonage-php-sdk)\n- [Python](https://github.com/Vonage/vonage-python-sdk)\n- [Ruby](https://github.com/Vonage/vonage-ruby-sdk)\n- [NodeJS](https://github.com/Vonage/vonage-node-sdk)\n\nWe also offer [client-side SDKs](https://developer.vonage.com/en/vonage-client-sdk/overview) for iOS, Android and JavaScript.\nSee all of our SDKs and integrations on the [Vonage Developer portal](https://developer.vonage.com/en/tools).\n\n## Installation\n\nReleases are published to [Maven Central](https://central.sonatype.com/artifact/com.vonage/server-sdk).\nInstructions for your build system can be found in the snippets section.\nWe *strongly recommend* that you use a tool that supports dependency management,\nsuch as [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/) or [Ivy](http://ant.apache.org/ivy/).\n\nRelease notes for each version can be found in the [changelog](CHANGELOG.md).\n\n### Build It Yourself\n\nAlternatively you can clone the repo and build the JAR file yourself:\n\n```bash\ngit clone git@github.com:vonage/vonage-java-sdk.git\nmvn install -P uberjar\n```\n\nThe `uberjar` profile will create a JAR file with all dependencies required to run the SDK included,\nwhich can be found in the `target` directory. The `install` goal will make the SDK and its dependencies\navailable in your local Maven repository (usually located under your `~/.m2` directory), which can then\nbe used from other projects locally on your machine. To use this in a Gradle project, you need to include\nthe dependency co-ordinates and add `mavenLocal()` to the `repositories` block in your `build.gradle` file.\n\n## Usage\n\n* For help understanding our APIs, check out our awesome [developer portal](https://developer.vonage.com/).\n* Check the [Javadoc](https://www.javadoc.io/doc/com.vonage/server-sdk/latest/index.html) for full reference documentation.\n* There are also **many useful code samples** in our [Vonage/vonage-java-code-snippets](https://github.com/Vonage/vonage-java-code-snippets) repository.\n* For a searchable list of code snippets examples, see [**SNIPPETS.md**](https://github.com/Vonage/vonage-java-code-snippets/blob/main/SNIPPETS.md).\n* For Video API usage instructions, see [the guide on our developer portal](https://developer.vonage.com/en/video/server-sdks/java).\n\n## Configuration\n\n## Typical Instantiation\nFor default configuration, you just need to specify your Vonage account credentials using API key and secret, private\nkey and application ID or both. For maximum compatibility with all APIs, it is recommended that you specify both\nauthentication methods, like so:\n\n```java\nVonageClient client = VonageClient.builder()\n        .applicationId(APPLICATION_ID)\n        .privateKeyPath(PRIVATE_KEY_PATH)\n        .apiKey(API_KEY)\n        .apiSecret(API_SECRET)\n        .build();\n```\n\n### Customize the Base URI\nBy default, the client will use https://api.nexmo.com, https://rest.nexmo.com,  https://api-eu.vonage.com and https://video.api.vonage.com as base URIs for the various endpoints. To customize these you can instantiate `VonageClient` with an `HttpConfig` object.\n\n`HttpConfig.Builder` has been created to assist in building this object. Usage is as follows:\n\n```java\nHttpConfig httpConfig = HttpConfig.builder()\n        .apiBaseUri(\"https://api.example.com\")\n        .restBaseUri(\"https://rest.example.com\")\n        .apiEuBaseUri(\"https://api-eu.example.com\")\n        .videoBaseUri(\"https://video.example.com\")\n        .build();\n\nVonageClient client = VonageClient.builder()\n        .apiKey(API_KEY).apiSecret(API_SECRET)\n        .httpConfig(httpConfig)\n        .build();\n```\n\nIf you do not specify a property, it will take on whatever the default value is. You can also set all three with a single method:\n\n```java\nHttpConfig httpConfig = HttpConfig.builder().baseUri(\"http://example.com\").build();\n\nVonageClient client = VonageClient.builder()\n        .apiKey(API_KEY).apiSecret(API_SECRET)\n        .httpConfig(httpConfig)\n        .build();\n```\n\n### Custom Timeout\n\nBy default, the SDK has a 1-minute timeout for requests.\nYou can change this to be longer or shorter using `HttpConfig`. The following example sets this to 12 seconds:\n\n```java\nVonageClient client = VonageClient.builder()\n        .applicationId(APPLICATION_ID)\n        .privateKeyPath(PRIVATE_KEY_PATH)\n        .httpConfig(HttpConfig.builder().timeoutMillis(12_000).build())\n        .build();\n```\n\n### Logging\n\nThe SDK uses [Java's built-in logging library (`java.util.logging`)](https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html) to log requests and responses.\nThis is primarily centralised in two places: [AbstractMethod](src/main/java/com/vonage/client/AbstractMethod.java)\nand [DynamicEndpoint](src/main/java/com/vonage/client/DynamicEndpoint.java).\nFor most cases, the former should provide sufficient level of detail.\nIt can be activated by setting the logger level to `FINE`, like so:\n\n```java\nLogManager.getLogManager().getLogger(\"com.vonage.client.AbstractMethod\").setLevel(Level.FINE);\n```\n\nSince the logger on `DynamicEndpoint` is not static and based on the class name, it will only be activated if the\nglobal log level is set to `FINE`. You can set the global log level like so:\n\n```java\nLogManager.getLogManager().getLogger(\"\").setLevel(Level.FINE);\n```\n\nThis will also activate the logger on `AbstractMethod` if you haven't already specified the desired log level on\nthat class, so you don't need to set it separately.\n\n## Frequently Asked Questions\n\n**Q: What happened to [`com.vonage:client`](https://search.maven.org/artifact/com.vonage/client)?**\n\n**A:** To avoid confusion with our various client-side SDKs, this server-side SDK has been moved from\nthe `com.vonage:client` coordinates to `com.vonage:server-sdk`. The old artifactId (`com.vonage:client`) will\nnot receive further updates. All users should migrate to the new artifactId. Please note that the SDK is functionally\nthe same, it is just a namespace change on Maven Central.\n\n**Q: What is your policy on thread safety?**\n\n**A:** The current architecture of the SDK means that only one thread should use the client at a time.\nIf you would like to use the SDK in a multithreaded environment, create a separate instance of\n`VonageClient` for each thread.\n\n**Q: Does this SDK support asynchronous request / response processing?**\n\n**A:** Currently no, but it is [on the roadmap](https://github.com/Vonage/vonage-java-sdk/issues/269).\n\n**Q: I'm having issues with my project when including the SDK as a dependency. How can I troubleshoot this?**\n\n**A:** Please see [this blog post](https://developer.vonage.com/en/blog/one-simple-trick-for-resolving-java-runtime-dependency-issues).\nIn short, you may have conflicting dependency versions in your project which clash with this SDK's transitive dependencies.\n\n**Q: I'm encountering HTTP request issues, such as timeouts. How can I remedy or report this?**\n\n**A:** This SDK uses [Apache HTTP Client 4](https://hc.apache.org/httpcomponents-client-4.5.x/index.html) under the\nhood, so you may be able to use system properties to configure the client, or use this SDK's `httpConfig` method on\nthe `Vonage` class  for more fine-grained control. If you believe there is an issue with the underlying client, please\n[raise an issue](https://github.com/Vonage/vonage-java-sdk/issues/new/choose) with a minimal reproducible example,\nincluding details of your environment (JVM runtime version, SDK version, operating system etc.)\n\n**Q: I'm not sure if my issue is with the SDK. How can I get help?**\n\n**A:** Please see our [support page](https://api.support.vonage.com/), including contact information.\n\n**Q: How do I migrate from TokBox to Vonage?**\n\n**A:** See [the OpenTok migration guide](https://developer.vonage.com/en/video/transition-guides/server-sdks/java).\n\n## Contribute!\n\n_We :heart: contributions to this library!_\n\nIt is a good idea to talk to us first if you plan to add any new functionality.\nOtherwise, [bug reports](https://github.com/Vonage/vonage-java-sdk/issues),\n[bug fixes](https://github.com/Vonage/vonage-java-sdk/pulls) and feedback on the\nlibrary are always appreciated.\n\n### Contact\n\n[![Email](https://img.shields.io/badge/Email-green?style=flat-square\u0026logo=gmail\u0026logoColor=FFFFFF\u0026labelColor=3A3B3C\u0026color=62F1CD)](mailto:community@vonage.com)\n[![Slack](https://img.shields.io/badge/Slack-4A154B?style=flat\u0026logo=slack\u0026logoColor=white)](https://developer.vonage.com/community/slack)\n[![Twitter](https://img.shields.io/badge/Twitter-000000?style=flat\u0026logo=x\u0026logoColor=white)](https://twitter.com/VonageDev)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvonage%2Fvonage-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvonage%2Fvonage-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvonage%2Fvonage-java-sdk/lists"}