Skip to content

feat: Support 100 character client_refs in SMS - #625

Merged
dragonmantank merged 1 commit into
mainfrom
fix-client_ref-length
Jul 25, 2026
Merged

feat: Support 100 character client_refs in SMS#625
dragonmantank merged 1 commit into
mainfrom
fix-client_ref-length

Conversation

@dragonmantank

Copy link
Copy Markdown
Member

Support 100 character length client_ref values in SMS

Contribution Checklist

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.05%. Comparing base (e1f7392) to head (86b3fda).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #625   +/-   ##
=========================================
  Coverage     99.05%   99.05%           
  Complexity     3643     3643           
=========================================
  Files           548      548           
  Lines          8051     8051           
  Branches        444      444           
=========================================
  Hits           7975     7975           
  Misses           56       56           
  Partials         20       20           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for longer SMS client-ref values by increasing the maximum allowed length and updating the release version/documentation accordingly.

Changes:

  • Increased SMS message client-ref validation limit from 40 to 100 characters.
  • Updated unit test to reflect the new rejection threshold.
  • Bumped SDK version to 9.11.0 and updated README + CHANGELOG.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/java/com/vonage/client/sms/SmsClientTest.java Updates the max-length validation test for SMS client-ref.
src/main/java/com/vonage/client/sms/messages/Message.java Raises client-ref max length to 100 and updates Javadoc/error message.
src/main/java/com/vonage/client/HttpWrapper.java Bumps internal client version used for the User-Agent to 9.11.0.
README.md Updates dependency snippets to 9.11.0.
pom.xml Updates project version to 9.11.0.
CHANGELOG.md Adds a 9.11.0 entry describing the SMS client-ref change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 108 to 112
public void setClientReference(String clientReference) {
if (clientReference.length() > 40) {
throw new IllegalArgumentException("Client reference must be 40 characters or less.");
if (clientReference.length() > 100) {
throw new IllegalArgumentException("Client reference must be 100 characters or less.");
}
this.clientReference = clientReference;
Comment on lines 75 to +76
assertThrows(VonageApiResponseException.class, () -> client.submitMessage(message));
assertThrows(IllegalArgumentException.class, () -> message.setClientReference("R".repeat(41)));
assertThrows(IllegalArgumentException.class, () -> message.setClientReference("R".repeat(101)));
Comment thread CHANGELOG.md
This project adheres to [Semantic Versioning](http://semver.org/).

# [9.11.0]
- SMS: Increased client reference (`client-ref`) maximum length from 40 to 100 characters, matching the Messages API
@dragonmantank
dragonmantank merged commit a9c514d into main Jul 25, 2026
17 checks passed
@dragonmantank
dragonmantank deleted the fix-client_ref-length branch July 25, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants