All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Viber video message now requires setting duration and file size
- Numbers API now uses Basic auth in header rather than query params
- Made
jakarta.servlet-apia required dependency (replacingjavax.servletas compileOnly) - Use
jakarta.xml.bind-apiinstead ofjavax.xml.bind - Added
premiumandlevelfields to Start Talk request - Refactored
TalkPayloadto use Builder pattern - Added
vbcandappendpoint types for voice calls - Fixed incorrect serialisation of
random_from_number - Added Builder for constructing
Callrequest - Added validation for UUIDs, URLs and request objects in
VoiceClient - Made internal request classes for Voice API package-private
- Deprecated public-facing usages of
CallModifer&ModifyCallPayload - Deprecated setters on classes in Voice API in favour of builders / constructors
com.vonage.client.voice.WebSocketEndpointnow uses Map for headers
- Updates to Messages v1:
- Added
InboundMessagewebhook class - Fixed timestamp format deserialization for MessageStatus (now returns an Instant)
- Added Viber file and video message types
- Added Action button support to Viber image and text messages
- Added WhatsApp Sticker message type
- Added WhatsApp Location custom message type
- Added WhatsApp Product custom message types
client_refcharacter limit increased to 100- Expanded valid message types to accommodate webhooks (MMS text, WhatsApp order, reply & unsupported)
- Added
- Deprecated Pay NCCO action (removed in 8.x)
- Deprecated WAPPush SMS (removed in 8.x)
- Bumped dependency versions
- Bumped Jackson version to 2.14
- Fixed parsing
MessageResponseExceptionwhen entity body is empty - Added toggle for using Messages API Sandbox to
MessagesClient - Deprecated
request_typeinVerifyRequest - Deprecated
ip_addressinCheckRequest - Fixed incorrect
Content-Typeheader inVerifyEndpoint(issue #405) andCheckEndpoint - Added
networkfield toVerifyResponse - Added
estimated_price_messages_senttoCheckResponseandVerifyDetails - Updated
VerifyStatusenum values - Added missing documentation and validation to requests and responses in Verify API
- Removed SMS Search API
- Deprecated Redact client
- Use
vonage-jwt-jdk:1.0.2library instead ofnexmo-jwt-jdk:1.0.1 - Ensure
User-Agentis set in request headers - Allow alphanumeric characters for SMS and MMS sender fields in Messages API
WhatsappRequestsender must now be an E164 number- Fixed incorrect restrictions on
WhatsappTemplateRequest- Policy is now optional
- Default locale is now
en - Locale is now an enum rather than String
parametersis nowList<String>
- Removed dependency on
commons-ioandcommons-lang3 - Ensured User-Agent is set in request headers
- Added Premium text-to-speech flag in
TalkActionNCCO - Removed support for legacy
voiceNameparameter - Updated SMS error status codes
- Added support for voice payments using NCCO action
- Updated NCCO classes
- Fixed Action deserialization (issue #373)
- Permit Object values for
WebSocketEndpointheaders - Removed varargs
headersmethod inWebSocketEndpoint.Builder - Made Builder constructors package-private
- Added
headersfield toSipEndpoint - Use
java.net.URIinstead of String for URI fields
- Updated Number Insight to be consistent with API specification
- Deprecated IP Address
- Added missing
InsightStatuscodes - Added documentation to Insight Response fields
- Moved AdvancedInsight enums to separate files
- Added
real_time_datato AdvancedInsightResponse
- Added Messages v1 API implementation
- Added
get-full-pricingendpoint - Added
Content-TypeandAcceptheaders in requests where applicable - Substantial internal refactoring
- Added
call_uuidto webhook call event. - Bumped dependency versions
- Adding Random From Number Feature for the Voice API, if set to
true, the from number will be randomly selected from the pool of numbers available to the application making the call. - adjusting operator used to check json payloads
- Adding extra parsing for top level Roaming Status in Advanced Number Insights
- Added parsing for JSON payloads when reading inbound SMS signatures
- Adding ContentId and EntityId to message class for DLT
- Adding Detail enum and string for certain voice webhooks
- Adding Language and Style to the Voice Talk Action and the Talk Request
- Marking VoiceName as Deprecated
- ASR (Automatic Speech Recognition)
- Refactored Application v2 requests to remove duplicated code
- Deprecated Product.MESSAGE from RedactRequest. Use Product.MESSAGES instead
- Deprecated InsightClient#getStandardNumberInsight(number, country, cnam). Use InsightClient#getStandardNumberInsight(StandardInsightRequest) instead
- Deprecated InsightClient.getAdvancedNumberInsight(number, country, ipAddress, cnam). Use InsightClient#getAdvancedNumberInsight(AdvancedInsightRequest) instead
- Deprecated InsightClient.getAdvancedNumberInsight(number, country, ipAddress). Use InsightClient#getAdvancedNumberInsight(AdvancedInsightRequest) instead
- Deprecated public constructors and setters in VerifyRequest use VerifyRequest.Builder instead
- Deprecated MD5Util use HashUtil instead
- Removed setters from BaseRequest. Set fields in the builders of Psd2Request or VerifyRequest instead.
- NotifyEvent structure for Notify Actions
- SHA256 hashing option
- Changed application requests to use basic auth in header for authentication
- Fixed error throw when trying to log No Content responses
- Nexmo rebranded to Vonage
- Added support for PSD2 verification
- Added AppEndpoint support for ConnectAction.
- Added the ability to log the API response in when logger is set to debug mode.
- Added ability to override base url for:
- Modify Call
- Send DTMF
- Stop Talk
- Added support for new voice names added to the Voice API for Text to Speech
- Improved error handling when there are apparent networking issues
- Added new workflows in
VerifyRequest
- Added support for verification workflows inside of
VerifyRequest. - Added support for transfer to NCCO via
VoiceClient#transferCall.
VerifyClienthad methods that were still claiming to throw anIOException. This has been removed as it is not possible for it to be thrown.
- Added support for setting an application id as a messages callback value in updating a number.
- Added support for specifying a number type when searching for a number to purchase.
- Added support for updating account settings (delivery receipt URL and inbound SMS URL)
- Added support for Async Number Insights by setting the property
asyncandcallbackon theAdvancedInsightRequestobject. - Add
ringbacksupport to theonAnswerpart of thePhoneEndpoint.
- Changed from Auth0 to the Nexmo JWT Library.
- Renamed the
com.nexmo.client.applicationspackage tocom.nexmo.client.application ApplicationClientnow supports the Applications v2 API. This change has resulted in some backwards incompatibility.NexmoClientExceptionis now aRuntimeException. The various sub client methods will still declare that it is being thrown, but it is no longer a requirement to catch the exception. Additionally, theIOExceptionthat was being thrown in each method has been converted to aNexmoResponseParseExceptionto more accurately reflect when it is thrown. This is also an unchecked exception and catching is no longer required.- The
NexmoUnacceptableAuthExceptionwill now add which parameters are missing instead of which internal auth methods.
- Added new voice 'MATTHEW' to
VoiceNameenum.
- Fix UTF-8 Encoding for endpoints using JSON bodies.
- Added
NotifyActionfor use inNCCO.
- Added header (application/json) for Redact client.
- Fixed Application Update to send json body as it is what the API now expects.
- Fixed the product name in Redact API for
messages.
- Missing builders for
StreamAction,AdvancedInsightRequest,StandardInsightRequest, andBasicInsightRequest.
AbstractMethodwill force UTF-8 charset for requests usingStringEntity.- Tests will now run using static builder methods for each of the classes that use builders for construction.
- Added static
buildermethods toActionclasses to reduce some of the verbosity around using them. You can now doTalkAction action = TalkAction.builder("Hello World!").build();instead of justTalkAction action = new TalkAction.Builder("Hello World).build();. - Added static
buildermethods toNexmoClientto reduce some of the verbosity around instantiating the client. - Added
nccoproperty to theCallobject for use in theVoiceClient.createCallmethod. You can now send anNccodirectly to the API instead of defining ananswer_url.
channelsproperty toRecordActionas it was unintentionally removed during the version 4 release.
- Added
Nccoclass to wrapCollection<Action>and handle the serialization of NCCO json throughtoJson. - Added the following
Builderclasses:ConnectAction.BuilderConversationAction.BuilderInputAction.BuilderRecordAction.BuilderStreamAction.BuilderTalkAction.Builder
- Added
PhoneEndpointtocom.nexmo.voice.nccopackage for use withConnectAction. - Added
WebSocketEndpointtocom.nexmo.voice.nccopackage for use withConnectAction. - Added
SipEndpointtocom.nexmo.voice.nccopackage for use withConnectAction. - Added
EventMethodenumeration to replace the usage of strings. - Added
EventTypeenumeration and the ability to specify theeventTypeproperty ofConnectAction. - Added
NexmoClient.Builderto allow for fluent creation ofNexmoClient. - Added
getBasicNumberInsight,getStandardNumberInsight, andgetAdvancedNumberInsighttoInsightClientwhich takes a respective*InsightRequest. - Added
CallerIdentitydata object to be used in number insight. - Added
BuildertoCallsFilterclass to make filtering search results more intuative.
- Renamed all
Nccoclasses toActionclasses:- Renamed
Nccointerface toAction - Renamed
ConnectNccotoConnectAction - Renamed
ConversationNccotoConversationAction - Renamed
InputNccotoInputAction - Renamed
RecordNccotoRecordAction - Renamed
StreamNccotoStreamAction - Renamed
TalkNccotoTalkAction
- Renamed
- All
Actionclasses now must be constructed through the providedBuilderclass. - All
Actionclasses are now immutable. - The
eventUrlproperty ofConnectAction,ConversationAction,InputAction, andRecordActionis now aCollection<String>instead of an array. - The
eventMethodproperty ofConnectAction,ConversationAction,InputAction, andRecordActionis now anEventMethodenum instead of a String. - Removed
ConnectWebSocketNccoas it is built intoConnectAction. VerifyClientwill now return*Responseinstead of*Resultobjects.- Refactored
com.nexmo.client.voice.endpointsto be part of thecom.nexmo.client.voicepackage. - Made all
*Endpointand*Methodclasses package scoped. Users should always go through the appropriateClientclasses. - Moved
AbstractMethodto the root package. - Removed legacy
setUrimethods from the variousVoiceClientendpoints. This should be done throughHttpConfig. - Changed
BasicInsightRequest,StandardInsightRequest, andAdvancedInsightRequestto use builders as constructor telescoping is clunky. Added some static factory methods to these classes to allow shortcutting through the builder for "simple" requests. - Updated
BasicInsightEndpoint,StandardInsightEndpoint, andAdvancedInsightEndpointto a more restrictive scope and moved them to thecom.nexmo.client.insightpackage. - Changed
statusproperty ofBasicInsightResponseto anInsightStatusenumeration. - Changed
SendMessageEndpointfrom XML to JSON. It now returns aSmsSubmissionResponseinstead of an array result.
- Added the ability to specify the number of channels to record in
RecordNcco
- Update base uri to always have the version string appended to it.
- Added missing voices to
VoiceNameenum. - Added configuration object to be used with
HttpWrapperto allow for customization. - Added the ability to customize the base URI used for the various endpoints.
- Added
ConnectWebSocketNccoto handle connecting to WebSocket endpoints similar toConnectNccoto maintain backwards compatibility. - Added
getDisplayNamemethod toVoiceNameto represent the name that is used in serialization.
TalkNccoto useVoiceNameobject instead ofStringHttpWrappernow uses system properties by default.
- Added
com.nexmo.client.incoming.MessageEventto assist with the deserialization of the JSON payload used for incoming messages. - Added
com.nexmo.client.incoming.CallEventto assist with the deserialization of the JSON payload used for call events. - Added
com.nexmo.client.incoming.InputEventto assist with the deserialization of the JSON payload used for input events. - Added
com.nexmo.client.incoming.RecordEventto assist with the deserialization of the JSON payload used for record events. - Added secret management methods to
AccountClientin the form of the following methods:listSecretsfor listing all secrets.getSecretfor getting information on a specific secret.revokeSecretfor revoking a secret.createSecretfor creating a new secret.
- User Agent String now includes the Java version in addition to the client version.
enumclasses that are used to deserialize JSON have been updated to return anUNKNOWNvalue instead of throwing anIllegalArgumentExceptionwhen the value cannot be deserialized. Theseenums are:RecordingFormatMachineDetectionModifyCallActionCallDirectionCallStatusRoamingDetails.RoamingStatusAdvancedInsightResponse.PortedStatusAdvancedInsightResponse.ValidityAdvancedInsightResponse.Reachability
- Updated
StreamNcco'sstreamUrlto serialize into an array for use in the Voice API.
- Added
RedactClientand the ability to interact with the Nexmo Redact API.
TalkNcconow usesVoiceNameinternally instead ofStringfor thevoiceNameproperty.
- Added
getSmsPricetoAccountClientfor getting SMS pricing for a country. - Added
getVoicePricetoAccountClientfor getting voice pricing for a country. - Added
getPrefixPricetoAccountClientfor getting SMS and voice pricing for a prefix. - Added
topUptoAccountClientfor topping up your account which has auto-reload enabled. - Added
getSmstoSmsClientfor searching for a single message by id. - Added
ConversionClientand the ability to interact with the Nexmo Conversion API.
-
Updated
VerifyClientto use the JSON endpoints instead of XML. -
Updated endpoints which are used by
VerifyClientfrom public to package scope in order to encourage usage throughVerifyClient. -
Deprecated XML version of the following endpoints:
VerifyEndpointCheckEndpointSearchEndpoint
-
Deprecated the following XML results:
VerifyResultshould useVerifyResponseCheckResultshould useCheckResponseSearchResultshould useSearchVerifyResponse
-
Deprecated the following XML methods:
VerifyCheckMethod
- Added
VerifyStatusenumeration to use for statuses coming back from the verify endpoint. - Added
VerifyResponse,CheckResponse, andSearchVerifyResponsefor JSON responses to match other JSON using endpoints. - Added
VerifyMethod,CheckMethod, andSearchMethodfor better segregation between endpoint and method classes. - Add
splitattribute to theRecordNccoobject.
- Updated
ConversationNcco'smusicOnHoldUrlto serialize into an array for use in the Voice API.
- Updated Jackson Databind dependency to newer version.
- Modify call now works with the API again, returning
null(because the API now returns 204 No Content) - VerifyRequest now supports all supported parameters.
- Client-side validation for the
fromparameter's length on theMessageclass has been removed.
- Add
levelattribute to theTalkNccoobject.
- Add signature authentication support to the API endpoints which support it.
- Add
NexmoClient.generateJwt - Add
VoiceClient.downloadRecording
- Made exceptions from
AuthCollection'sgetAuthandgetAcceptableAuthMethodmore specific. (Backwards compatible change)
ModifyCallPayload.actionis now a value of the enumModifyCallPayload.Action.- All calls now throw
HttpResponseExceptionif an abnormal HTTP status code is returned from the Nexmo API.
- Added missing values for CallStatus: FAILED, REJECTED, BUSY & CANCELLED
- Add missing setter for the Message.statusReportRequired property.
- Add
AccountClient.getBalancemethod for getting an account balance. - Add
NumbersClient.listNumbersmethod. - Add
NumbersClient.searchNumbersmethod. - Add
NumbersClient.cancelNumbermethod. - Add
NumbersClient.buyNumbermethod. - Add
NumbersClient.updateNumberandNumbersClient.linkNumber. - Add the ability to mute, unmute, earmuff, unearmuff and transfer an ongoing call.
- Add
VerifyClient.advanceVerificationandVerifyClient.cancelVerification - Add
ApplicationClientend methods for creating, updating, deleting, listing and getting configured applications. - Add extra endpoints for searching SMS messages.
- All URL-encoded PUT and POST requests are now UTF-8 instead of ISO-8859-1.
- The event url is properly set on a
Call
- Number Insight now supports the
cnamparameter for Standard and Advanced requests.
- Made servlet-api an optional dependency so it isn't bundled in war files. (This could result in class conflicts in Tomcat.)
- Nexmo Voice API
- Automated testing and code quality with Travis CI, Codecov and Codacy
- Publishing to Maven Central
- Complete refactoring and reorganisation of the library. All classes are now
under the
com.nexmo.clientpackage.
- New Insight API using non-deprecated endpoints.
- Migrate to Gradle
- Internal refactoring for unit testing
- Removed example code. See nexmo-community/nexmo-java-quickstart instead.
- Support for USSD submission
- Include LICENSE.txt file and license in all source files
- Updated signature generation/verification in line with updates to Nexmo Service
- Include the 'network' field in the SmsSubmissionResult object
- Migrate to apache httpclient 4.1
- Switch from use of username/password to 'api_key' / 'api_secret'
- Add support for 'signed' requests (using
NexmoSmsClientSignedRequests) - Message submissions can now specify a protocol-id value where required
- Add support for supplying a ValidityPeriod along with a Message when submitting a snsRequest
- Add support for performing reachability checks if the feature is enabled on your account
- Message submissions can now specify a message-class using the enum
com.nexmo.messaging.sdk.messages.parameters.MessageClass - Add support for supplying a network code to override the Nexmo automatic network detection (Feature must be enabled on your account)
- Adding constants for all current response codes
- Adding 'destination' and 'reachability' values to response object
- Correcting some comments and log statements
- Fix some small things reported by findbugs
- Re-factor NexmoSmsClient. There are now sub-classes of this client class depending on the level of security required
com.nexmo.messaging.sdk.NexmoSmsClient: The default clientcom.nexmo.messaging.sdk.NexmoSmsClientSSL: Uses SSL / HTTPS to encrypt the requestscom.nexmo.messaging.sdk.NexmoSmsClientSignedRequests: Signs the requests using the secret key assigned to your accountcom.nexmo.messaging.sdk.NexmoSmsClientSignedRequestsSSL: Signs the requests and uses SSL / HTTPS to encrypt
- Add https support to message submissions
- Add 'ant example-https' example task
- Add support for 'messagePrice' in the api response
- Add reporting of remaining-balance and message-price in the example scripts
- Add support for nexmo SNS service
- Ams submission - report comms-failure as an error response, not as an exception
- Ams submission - add support for 'remainingBalance' in the api response