Skip to content

Commit 64180b0

Browse files
feat: Various updates for the 9.8.0 release
* DEVX-10813 - Add `trusted_recipient` to SMS, MMS, and RCS * DEVX-10776 - Add support for WA Typing Indicators * Bumped version to 9.8.0 for release prep * DEVX-10730 - Add websocket authorization headers * DEVX-10721 - Add SIP User-To-User in Answer Webhooks * DEVX-10694 - Deprecate Verify Sandbox parameter * DEVX-10534 - Number Insights only supports Header authentication * DEVX-10533 - Accounts uses Basic Header Auth only now * DEVX-10532 - Verify v1 supports only Basic header auth * DEVX-10531 - Conversion uses only Basic Header Auth * DEVX-10410 - Add 24000 rate for websockets * Added deprecation warning for Java 8 * DEVX-10449 - Add shaken property to Phone endpoint * DEVX-10387 - Add support for sip_code on incoming event webhook * DEVX-10373 - Added Transfer NCCO action * DEVX-10236 - Added support for the Wait NCCO action * DEVX-10011 - Added support for messages pool_id * DEVX-10700 - Added Identity Insights * Organized changelog for 9.8.0 * Update CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/main/java/com/vonage/client/messages/sms/SmsTextRequest.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 035e9a7 commit 64180b0

65 files changed

Lines changed: 3849 additions & 53 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
# [9.8.0] - 2025-01-29
6+
- Added deprecation notice for Java 8/1.8 users. Version 9.x will be the final version to support Java 8.
7+
- Accounts: Internally switched to supporting only Basic Authorization header authentication
8+
- Conversion: Internally switched to supporting only Basic Authorization header authentication
9+
- Identity Insights: Added new API, covers Formatting, SimSwap, Original and Current Carrier checks
10+
- Messages: Added `trusted_recipient` to SMS, MMS, and RCS
11+
- Messages: Added support for Typing Indicators in WhatsApp
12+
- Messages: Added `pool_id` support
13+
- Number Insights: Internally switched to supporting only Basic Authorization header authentication
14+
- Verify v1: Internally switched to supporting only Basic Authorization header authentication
15+
- Verify: Deprecates the `sandbox` parameter
16+
- Voice: Websocket Connections can now include custom authorization headers
17+
- Voice: Answer Webhook adds support for SIP User-To-User incoming headers
18+
- Voice: Add support for `shaken` signing on calls
19+
- Voice: Added support for `sip_code` on incoming event webhooks
20+
- Voice: Added support for Transfer NCCO action
21+
- Voice: Added support for Wait NCCO action
22+
523
# [9.7.0] - 2025-12-04
624
- Added native RCS message types (card, carousel) and suggestions support to eliminate need for custom message type
725

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,23 @@ such as [Maven](https://maven.apache.org/), [Gradle](https://gradle.org/) or [Iv
6767

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

70+
> [!WARNING]
71+
> **Java 8 Deprecation Notice**
72+
>
73+
> Version 9.x is the last major version to support Java 8. Support ends on **June 30, 2026**.
74+
> Future versions (10.0+) will require **Java 11 or later**.
75+
>
76+
> If you are running Java 8, you will see a warning message in your logs when initializing the SDK.
77+
> Please plan to upgrade your Java runtime, or pin your SDK version to 9.x.
78+
7079
Here are the instructions for including the SDK in your project:
7180

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

7584
```groovy
7685
dependencies {
77-
implementation("com.vonage:server-sdk:9.7.0")
86+
implementation("com.vonage:server-sdk:9.8.0")
7887
}
7988
```
8089

@@ -85,7 +94,7 @@ Add the following to the `<dependencies>` section of your `pom.xml` file:
8594
<dependency>
8695
<groupId>com.vonage</groupId>
8796
<artifactId>server-sdk</artifactId>
88-
<version>9.7.0</version>
97+
<version>9.8.0</version>
8998
</dependency>
9099
```
91100

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

302311
## Frequently Asked Questions
303312

313+
**Q: I'm seeing a warning about Java 8. What should I do?**
314+
315+
**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:
316+
1. **Recommended**: Upgrade your Java runtime to Java 11 or later
317+
2. Pin your SDK version to 9.x in your dependency configuration (though you will miss out on future updates and bug fixes)
318+
319+
The warning appears once per application lifecycle and does not affect functionality.
320+
304321
**Q: What happened to [`com.vonage:client`](https://search.maven.org/artifact/com.vonage/client)?**
305322

306323
**A:** To avoid confusion with our various client-side SDKs, this server-side SDK has been moved from

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.vonage</groupId>
77
<artifactId>server-sdk</artifactId>
8-
<version>9.7.0</version>
8+
<version>9.8.0</version>
99

1010
<name>Vonage Java Server SDK</name>
1111
<description>Java client for Vonage APIs</description>
@@ -306,6 +306,8 @@
306306
<arg>--pinentry-mode</arg>
307307
<arg>loopback</arg>
308308
</gpgArguments>
309+
<keyname>${gpg.keyname}</keyname>
310+
<homedir>${gpg.homedir}</homedir>
309311
</configuration>
310312
</plugin>
311313
<plugin>

src/main/java/com/vonage/client/HttpWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
public class HttpWrapper {
3838
private static final String
3939
CLIENT_NAME = "vonage-java-sdk",
40-
CLIENT_VERSION = "9.7.0",
40+
CLIENT_VERSION = "9.8.0",
4141
JAVA_VERSION = System.getProperty("java.version"),
4242
USER_AGENT = String.format("%s/%s java/%s", CLIENT_NAME, CLIENT_VERSION, JAVA_VERSION);
4343

src/main/java/com/vonage/client/VonageClient.java

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import com.vonage.client.camara.numberverification.NumberVerificationClient;
2626
import com.vonage.client.camara.simswap.SimSwapClient;
2727
import com.vonage.client.conversations.ConversationsClient;
28+
import com.vonage.client.identityinsights.IdentityInsightsClient;
2829
import com.vonage.client.conversion.ConversionClient;
2930
import com.vonage.client.insight.InsightClient;
3031
import com.vonage.client.messages.MessagesClient;
@@ -49,9 +50,18 @@
4950
* <p>
5051
* Construct an instance of this object with one or more {@link AuthMethod}s (providing all the authentication methods
5152
* for the APIs you wish to use), and then call {@link #getVoiceClient()} to obtain a client for the Vonage Voice API.
52-
* <p>.
53+
* <p>
54+
* <p><strong>DEPRECATION NOTICE:</strong></p>
55+
* <p>This SDK version (9.x) is the last major version to support Java 8.</p>
56+
* <p>Starting with version 10.0, Java 11 or later will be required.</p>
57+
* <p>Java 8 support will end on June 30, 2026. Please upgrade your Java runtime or pin your SDK version to 9.x.</p>
5358
*/
5459
public class VonageClient {
60+
/**
61+
* Flag to ensure the Java 8 deprecation warning is only printed once.
62+
*/
63+
private static volatile boolean java8WarningShown = false;
64+
5565
/**
5666
* The HTTP wrapper for this client and its sub-clients.
5767
*/
@@ -74,13 +84,15 @@ public class VonageClient {
7484
private final ConversationsClient conversations;
7585
private final SimSwapClient simSwap;
7686
private final NumberVerificationClient numberVerification;
87+
private final IdentityInsightsClient identityInsights;
7788

7889
/**
7990
* Constructor which uses the builder pattern for instantiation.
8091
*
8192
* @param builder The builder object to use for configuration.
8293
*/
8394
private VonageClient(Builder builder) {
95+
warnOnLegacyJava();
8496
httpWrapper = new HttpWrapper(builder.httpConfig, builder.authCollection, builder.httpClient);
8597

8698
custom = new CustomClient(httpWrapper);
@@ -101,6 +113,30 @@ private VonageClient(Builder builder) {
101113
conversations = new ConversationsClient(httpWrapper);
102114
simSwap = new SimSwapClient(httpWrapper);
103115
numberVerification = new NumberVerificationClient(httpWrapper);
116+
identityInsights = new IdentityInsightsClient(httpWrapper);
117+
}
118+
119+
/**
120+
* Checks if the current Java version is Java 8 and prints a deprecation warning to stderr if it is.
121+
* This warning is only shown once per JVM process to avoid log spam.
122+
*/
123+
private static void warnOnLegacyJava() {
124+
if (java8WarningShown) {
125+
return;
126+
}
127+
128+
String version = System.getProperty("java.specification.version");
129+
if ("1.8".equals(version)) {
130+
synchronized (VonageClient.class) {
131+
// Double-check after acquiring lock to prevent race conditions
132+
if (!java8WarningShown) {
133+
System.err.println("⚠️ [VONAGE SDK WARNING] You are using Java 8. Support ends on June 30, 2026.");
134+
System.err.println(" Future versions of this SDK (v10.0+) will require Java 11 or later.");
135+
System.err.println(" Please upgrade your runtime or pin your SDK version to 9.x.");
136+
java8WarningShown = true;
137+
}
138+
}
139+
}
104140
}
105141

106142
/**
@@ -283,6 +319,16 @@ public NumberVerificationClient getNumberVerificationClient() {
283319
return numberVerification;
284320
}
285321

322+
/**
323+
* Returns the Identity Insights API client.
324+
*
325+
* @return The {@linkplain IdentityInsightsClient}.
326+
* @since 9.1.0
327+
*/
328+
public IdentityInsightsClient getIdentityInsightsClient() {
329+
return identityInsights;
330+
}
331+
286332
/**
287333
* Generate a JWT for the application the client has been configured with.
288334
*

src/main/java/com/vonage/client/account/AccountClient.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import com.vonage.client.*;
1919
import com.vonage.client.auth.ApiKeyHeaderAuthMethod;
20-
import com.vonage.client.auth.SignatureAuthMethod;
2120
import com.vonage.client.common.HttpMethod;
2221
import java.util.List;
2322
import java.util.Objects;
@@ -58,15 +57,15 @@ class Endpoint<T, R> extends DynamicEndpoint<T, R> {
5857
this(pathGetter, method, false, method == HttpMethod.POST, type);
5958
}
6059
Endpoint(Function<T, String> pathGetter, HttpMethod method,
61-
boolean signatureAuth, boolean formEncoded, R... type
60+
boolean useApiBaseUri, boolean formEncoded, R... type
6261
) {
6362
super(DynamicEndpoint.<T, R> builder(type)
6463
.wrapper(wrapper).requestMethod(method)
65-
.authMethod(ApiKeyHeaderAuthMethod.class, signatureAuth ? SignatureAuthMethod.class : null)
64+
.authMethod(ApiKeyHeaderAuthMethod.class)
6665
.responseExceptionType(AccountResponseException.class)
6766
.urlFormEncodedContentType(formEncoded).pathGetter((de, req) -> {
6867
HttpConfig config = de.getHttpWrapper().getHttpConfig();
69-
String base = signatureAuth ? config.getApiBaseUri() : config.getRestBaseUri();
68+
String base = useApiBaseUri ? config.getApiBaseUri() : config.getRestBaseUri();
7069
return base + "/account" + pathGetter.apply(req);
7170
})
7271
);

src/main/java/com/vonage/client/conversion/ConversionClient.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
package com.vonage.client.conversion;
1717

1818
import com.vonage.client.*;
19-
import com.vonage.client.auth.ApiKeyQueryParamsAuthMethod;
20-
import com.vonage.client.auth.SignatureAuthMethod;
19+
import com.vonage.client.auth.ApiKeyHeaderAuthMethod;
2120
import com.vonage.client.common.HttpMethod;
2221
import java.util.Date;
2322

@@ -38,7 +37,7 @@ public ConversionClient(HttpWrapper wrapper) {
3837
.pathGetter((de, req) -> de.getHttpWrapper().getHttpConfig().getApiBaseUri() +
3938
"/conversions/" + req.getType().name().toLowerCase()
4039
)
41-
.authMethod(SignatureAuthMethod.class, ApiKeyQueryParamsAuthMethod.class)
40+
.authMethod(ApiKeyHeaderAuthMethod.class)
4241
.requestMethod(HttpMethod.POST).wrapper(wrapper).build();
4342
}
4443

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
* Copyright 2025 Vonage
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.vonage.client.identityinsights;
17+
18+
import com.fasterxml.jackson.annotation.JsonProperty;
19+
import com.vonage.client.JsonableBaseObject;
20+
21+
/**
22+
* Response containing information about the current carrier assigned to a phone number.
23+
*
24+
* @since 9.1.0
25+
*/
26+
public class CurrentCarrierInsightResponse extends JsonableBaseObject {
27+
private String name, countryCode, networkCode;
28+
private NetworkType networkType;
29+
private InsightStatus status;
30+
31+
protected CurrentCarrierInsightResponse() {}
32+
33+
/**
34+
* Gets the full name of the current carrier.
35+
*
36+
* @return The carrier name, or {@code null} if unavailable.
37+
*/
38+
@JsonProperty("name")
39+
public String getName() {
40+
return name;
41+
}
42+
43+
/**
44+
* Gets the type of network.
45+
*
46+
* @return The network type, or {@code null} if unavailable.
47+
*/
48+
@JsonProperty("network_type")
49+
public NetworkType getNetworkType() {
50+
return networkType;
51+
}
52+
53+
/**
54+
* Gets the country code (ISO 3166-1 alpha-2).
55+
*
56+
* @return The country code, or {@code null} if unavailable.
57+
*/
58+
@JsonProperty("country_code")
59+
public String getCountryCode() {
60+
return countryCode;
61+
}
62+
63+
/**
64+
* Gets the network code (MCC + MNC).
65+
*
66+
* @return The network code, or {@code null} if unavailable.
67+
*/
68+
@JsonProperty("network_code")
69+
public String getNetworkCode() {
70+
return networkCode;
71+
}
72+
73+
/**
74+
* Gets the status of this insight.
75+
*
76+
* @return The insight status.
77+
*/
78+
@JsonProperty("status")
79+
public InsightStatus getStatus() {
80+
return status;
81+
}
82+
}

0 commit comments

Comments
 (0)