This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Configuring Nexmo Operations

To use the Nexmo connector, add the  <nexmo.init>  element in your configuration before carrying out any other Nexmo operations. 

Before you start performing various operations with the connector, make sure to import the Nexmo certificate to your ESB client keystore.

Follow the below mentioned steps to add valid certificate to access Nexmo API over https into the ESB client keystore:

  1. Extract the certificate from browse by navigating to ' https://dashboard.nexmo.com/private/dashboard ' and click the lock icon on the address bar to view the certificate.
  2. Place the downloaded certificate into "Nexmo_CONNECTOR_HOME/src/test/resources/keystores/products" folder.
  3. Navigate to "Nexmo_CONNECTOR_HOME/src/test/resources/keystores/products/" using command prompt and execute the following command.
  4. This command will import Nexmo certificate in to keystore. Give "wso2carbon" as password.To import the certificate give "wso2carbon" as password. Press "Y" to complete certificate import process.

    keytool -importcert -file CERT_FILE_NAME -keystore wso2carbon.jks -alias -alias "CERT_NAME"

Nexmo uses two-factor authentication. F or more information on authentication, see https://docs.nexmo.com/index.php/US-shared-short-code-api/two-factor-authentication.

init
<nexmo.init>
    <responseType>{$ctx:responseType}</responseType>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <apiSecret>{$ctx:apiSecret}</apiSecret>
	<apiKey>{$ctx:apiKey}</apiKey>
</nexmo.init>
Properties  
  • responseType:  The response type of the method call.
  • apiUrl: The URL to access the Nexmo API.
  • apiSecret: The API secret of a valid Nexmo account.
  • apiKey: The API key of a valid Nexmo account.

Additional information

Ensure that the following Axis2 configurations are added and enabled in the <ESB_HOME>\repository\conf\axis2\axis2.xml file.

Required message formatters 
messageFormatters
<messageFormatter contentType="application/octet-stream" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
 
<messageFormatter contentType="text/html" class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>
Required message builders
messageBuilders
<messageBuilder contentType="application/octet-stream" class="org.wso2.carbon.relay.BinaryRelayBuilder"/>
 
<messageBuilder contentType="text/html" class="org.wso2.carbon.relay.BinaryRelayBuilder"/>

Now that you have connected to Nexmo, use the information in the following topics to perform various operations with the connector.