Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
895bf28
DEVX-10813 - Add `trusted_recipient` to SMS, MMS, and RCS
dragonmantank Jan 30, 2026
c209ba3
DEVX-10776 - Add support for WA Typing Indicators
dragonmantank Jan 30, 2026
a20419a
Bumped version to 9.8.0 for release prep
dragonmantank Jan 30, 2026
6382583
DEVX-10730 - Add websocket authorization headers
dragonmantank Jan 30, 2026
f03197c
DEVX-10721 - Add SIP User-To-User in Answer Webhooks
dragonmantank Jan 30, 2026
fea2d0c
DEVX-10694 - Deprecate Verify Sandbox parameter
dragonmantank Jan 30, 2026
6ca6fa7
DEVX-10534 - Number Insights only supports Header authentication
dragonmantank Jan 30, 2026
b4db5dc
DEVX-10533 - Accounts uses Basic Header Auth only now
dragonmantank Jan 30, 2026
65d16b9
DEVX-10532 - Verify v1 supports only Basic header auth
dragonmantank Jan 30, 2026
a70712f
DEVX-10531 - Conversion uses only Basic Header Auth
dragonmantank Jan 30, 2026
a7aed2b
DEVX-10410 - Add 24000 rate for websockets
dragonmantank Jan 30, 2026
27c4e65
Added deprecation warning for Java 8
dragonmantank Jan 30, 2026
89d78b2
DEVX-10449 - Add shaken property to Phone endpoint
dragonmantank Jan 30, 2026
f85367d
DEVX-10387 - Add support for sip_code on incoming event webhook
dragonmantank Jan 30, 2026
1ce26c5
DEVX-10373 - Added Transfer NCCO action
dragonmantank Jan 30, 2026
10025dd
DEVX-10236 - Added support for the Wait NCCO action
dragonmantank Jan 30, 2026
826c381
DEVX-10011 - Added support for messages pool_id
dragonmantank Jan 30, 2026
6b9e27d
DEVX-10700 - Added Identity Insights
dragonmantank Jan 30, 2026
2565944
Organized changelog for 9.8.0
dragonmantank Jan 30, 2026
c5a5ad8
Update CHANGELOG.md
dragonmantank Jan 30, 2026
3e52dce
Update CHANGELOG.md
dragonmantank Jan 30, 2026
abe1bff
Update src/main/java/com/vonage/client/messages/sms/SmsTextRequest.java
dragonmantank Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

# [9.8.0] - 2025-01-29
- Added deprecation notice for Java 8/1.8 users. Version 9.x will be the final version to support Java 8.
- Accounts: Internally switched to supporting only Basic Authorization header authentication
- Conversion: Internally switched to supporting only Basic Authorization header authentication
- Identity Insights: Added new API, covers Formatting, SimSwap, Original and Current Carrier checks
- Messages: Added `trusted_recipient` to SMS, MMS, and RCS
- Messages: Added support for Typing Indicators in WhatsApp
- Messages: Added `pool_id` support
- Number Insights: Internally switched to supporting only Basic Authorization header authentication
- Verify v1: Internally switched to supporting only Basic Authorization header authentication
- Verify: Deprecates the `sandbox` parameter
- Voice: Websocket Connections can now include custom authorization headers
- Voice: Answer Webhook adds support for SIP User-To-User incoming headers
- Voice: Add support for `shaken` signing on calls
- Voice: Added support for `sip_code` on incoming event webhooks
- Voice: Added support for Transfer NCCO action
- Voice: Added support for Wait NCCO action

# [9.7.0] - 2025-12-04
- Added native RCS message types (card, carousel) and suggestions support to eliminate need for custom message type

Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,23 @@ such as [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/) or [Iv

Release notes for each version can be found in the [changelog](CHANGELOG.md).

> [!WARNING]
> **Java 8 Deprecation Notice**
>
> Version 9.x is the last major version to support Java 8. Support ends on **June 30, 2026**.
> Future versions (10.0+) will require **Java 11 or later**.
>
> If you are running Java 8, you will see a warning message in your logs when initializing the SDK.
> Please plan to upgrade your Java runtime, or pin your SDK version to 9.x.

Here are the instructions for including the SDK in your project:

### Gradle
Add the following to your `build.gradle` or `build.gradle.kts` file:

```groovy
dependencies {
implementation("com.vonage:server-sdk:9.7.0")
implementation("com.vonage:server-sdk:9.8.0")
}
```

Expand All @@ -85,7 +94,7 @@ Add the following to the `<dependencies>` section of your `pom.xml` file:
<dependency>
<groupId>com.vonage</groupId>
<artifactId>server-sdk</artifactId>
<version>9.7.0</version>
<version>9.8.0</version>
</dependency>
```

Expand Down Expand Up @@ -301,6 +310,14 @@ that class, so you don't need to set it separately.

## Frequently Asked Questions

**Q: I'm seeing a warning about Java 8. What should I do?**

**A:** Version 9.x is the last major version to support Java 8. Support ends on June 30, 2026. Future versions (10.0+) will require Java 11 or later. If you are running Java 8, you have two options:
1. **Recommended**: Upgrade your Java runtime to Java 11 or later
2. Pin your SDK version to 9.x in your dependency configuration (though you will miss out on future updates and bug fixes)

The warning appears once per application lifecycle and does not affect functionality.

**Q: What happened to [`com.vonage:client`](https://search.maven.org/artifact/com.vonage/client)?**

**A:** To avoid confusion with our various client-side SDKs, this server-side SDK has been moved from
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.vonage</groupId>
<artifactId>server-sdk</artifactId>
<version>9.7.0</version>
<version>9.8.0</version>

<name>Vonage Java Server SDK</name>
<description>Java client for Vonage APIs</description>
Expand Down Expand Up @@ -306,6 +306,8 @@
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<keyname>${gpg.keyname}</keyname>
<homedir>${gpg.homedir}</homedir>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/vonage/client/HttpWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class HttpWrapper {
private static final String
CLIENT_NAME = "vonage-java-sdk",
CLIENT_VERSION = "9.7.0",
CLIENT_VERSION = "9.8.0",
JAVA_VERSION = System.getProperty("java.version"),
USER_AGENT = String.format("%s/%s java/%s", CLIENT_NAME, CLIENT_VERSION, JAVA_VERSION);

Expand Down
48 changes: 47 additions & 1 deletion src/main/java/com/vonage/client/VonageClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.vonage.client.camara.numberverification.NumberVerificationClient;
import com.vonage.client.camara.simswap.SimSwapClient;
import com.vonage.client.conversations.ConversationsClient;
import com.vonage.client.identityinsights.IdentityInsightsClient;
import com.vonage.client.conversion.ConversionClient;
import com.vonage.client.insight.InsightClient;
import com.vonage.client.messages.MessagesClient;
Expand All @@ -49,9 +50,18 @@
* <p>
* Construct an instance of this object with one or more {@link AuthMethod}s (providing all the authentication methods
* for the APIs you wish to use), and then call {@link #getVoiceClient()} to obtain a client for the Vonage Voice API.
* <p>.
* <p>
* <p><strong>DEPRECATION NOTICE:</strong></p>
* <p>This SDK version (9.x) is the last major version to support Java 8.</p>
* <p>Starting with version 10.0, Java 11 or later will be required.</p>
* <p>Java 8 support will end on June 30, 2026. Please upgrade your Java runtime or pin your SDK version to 9.x.</p>
*/
public class VonageClient {
/**
* Flag to ensure the Java 8 deprecation warning is only printed once.
*/
private static volatile boolean java8WarningShown = false;

/**
* The HTTP wrapper for this client and its sub-clients.
*/
Expand All @@ -74,13 +84,15 @@ public class VonageClient {
private final ConversationsClient conversations;
private final SimSwapClient simSwap;
private final NumberVerificationClient numberVerification;
private final IdentityInsightsClient identityInsights;

/**
* Constructor which uses the builder pattern for instantiation.
*
* @param builder The builder object to use for configuration.
*/
private VonageClient(Builder builder) {
warnOnLegacyJava();
httpWrapper = new HttpWrapper(builder.httpConfig, builder.authCollection, builder.httpClient);

custom = new CustomClient(httpWrapper);
Expand All @@ -101,6 +113,30 @@ private VonageClient(Builder builder) {
conversations = new ConversationsClient(httpWrapper);
simSwap = new SimSwapClient(httpWrapper);
numberVerification = new NumberVerificationClient(httpWrapper);
identityInsights = new IdentityInsightsClient(httpWrapper);
}

/**
* Checks if the current Java version is Java 8 and prints a deprecation warning to stderr if it is.
* This warning is only shown once per JVM process to avoid log spam.
*/
private static void warnOnLegacyJava() {
if (java8WarningShown) {
return;
}

String version = System.getProperty("java.specification.version");
if ("1.8".equals(version)) {
synchronized (VonageClient.class) {
// Double-check after acquiring lock to prevent race conditions
if (!java8WarningShown) {
System.err.println("⚠️ [VONAGE SDK WARNING] You are using Java 8. Support ends on June 30, 2026.");
System.err.println(" Future versions of this SDK (v10.0+) will require Java 11 or later.");
System.err.println(" Please upgrade your runtime or pin your SDK version to 9.x.");
java8WarningShown = true;
}
}
}
}

/**
Expand Down Expand Up @@ -283,6 +319,16 @@ public NumberVerificationClient getNumberVerificationClient() {
return numberVerification;
}

/**
* Returns the Identity Insights API client.
*
* @return The {@linkplain IdentityInsightsClient}.
* @since 9.1.0
*/
public IdentityInsightsClient getIdentityInsightsClient() {
return identityInsights;
}

/**
* Generate a JWT for the application the client has been configured with.
*
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/vonage/client/account/AccountClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.vonage.client.*;
import com.vonage.client.auth.ApiKeyHeaderAuthMethod;
import com.vonage.client.auth.SignatureAuthMethod;
import com.vonage.client.common.HttpMethod;
import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -58,15 +57,15 @@ class Endpoint<T, R> extends DynamicEndpoint<T, R> {
this(pathGetter, method, false, method == HttpMethod.POST, type);
}
Endpoint(Function<T, String> pathGetter, HttpMethod method,
boolean signatureAuth, boolean formEncoded, R... type
boolean useApiBaseUri, boolean formEncoded, R... type
) {
super(DynamicEndpoint.<T, R> builder(type)
.wrapper(wrapper).requestMethod(method)
.authMethod(ApiKeyHeaderAuthMethod.class, signatureAuth ? SignatureAuthMethod.class : null)
.authMethod(ApiKeyHeaderAuthMethod.class)
.responseExceptionType(AccountResponseException.class)
.urlFormEncodedContentType(formEncoded).pathGetter((de, req) -> {
HttpConfig config = de.getHttpWrapper().getHttpConfig();
String base = signatureAuth ? config.getApiBaseUri() : config.getRestBaseUri();
String base = useApiBaseUri ? config.getApiBaseUri() : config.getRestBaseUri();
return base + "/account" + pathGetter.apply(req);
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
package com.vonage.client.conversion;

import com.vonage.client.*;
import com.vonage.client.auth.ApiKeyQueryParamsAuthMethod;
import com.vonage.client.auth.SignatureAuthMethod;
import com.vonage.client.auth.ApiKeyHeaderAuthMethod;
import com.vonage.client.common.HttpMethod;
import java.util.Date;

Expand All @@ -38,7 +37,7 @@ public ConversionClient(HttpWrapper wrapper) {
.pathGetter((de, req) -> de.getHttpWrapper().getHttpConfig().getApiBaseUri() +
"/conversions/" + req.getType().name().toLowerCase()
)
.authMethod(SignatureAuthMethod.class, ApiKeyQueryParamsAuthMethod.class)
.authMethod(ApiKeyHeaderAuthMethod.class)
.requestMethod(HttpMethod.POST).wrapper(wrapper).build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
* Copyright 2025 Vonage
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.vonage.client.identityinsights;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.vonage.client.JsonableBaseObject;

/**
* Response containing information about the current carrier assigned to a phone number.
*
* @since 9.1.0
*/
public class CurrentCarrierInsightResponse extends JsonableBaseObject {
private String name, countryCode, networkCode;
private NetworkType networkType;
private InsightStatus status;

protected CurrentCarrierInsightResponse() {}

/**
* Gets the full name of the current carrier.
*
* @return The carrier name, or {@code null} if unavailable.
*/
@JsonProperty("name")
public String getName() {
return name;
}

/**
* Gets the type of network.
*
* @return The network type, or {@code null} if unavailable.
*/
@JsonProperty("network_type")
public NetworkType getNetworkType() {
return networkType;
}

/**
* Gets the country code (ISO 3166-1 alpha-2).
*
* @return The country code, or {@code null} if unavailable.
*/
@JsonProperty("country_code")
public String getCountryCode() {
return countryCode;
}

/**
* Gets the network code (MCC + MNC).
*
* @return The network code, or {@code null} if unavailable.
*/
@JsonProperty("network_code")
public String getNetworkCode() {
return networkCode;
}

/**
* Gets the status of this insight.
*
* @return The insight status.
*/
@JsonProperty("status")
public InsightStatus getStatus() {
return status;
}
}
Loading