Client library for Nexmo Application API
npm install --save @datafire/nexmo_application
let nexmo_application = require('@datafire/nexmo_application').create();
.then(data => {
console.log(data);
});
This version of the API has been deprecated. Please use version 2 going forwards
You use a GET
request to retrieve details of all applications associated with your account.
nexmo_application.retrieveApplications({
"api_key": "",
"api_secret": ""
}, context)
- input
object
- api_key required
string
: You can find your API key in your account overview - api_secret required
string
: You can find your API secret in your account overview - page_size
integer
: Set the number of items returned on each call to this endpoint. The default is 10 records. - page_index
integer
: Set the offset from the first page. The default value is0
.
- api_key required
- output applications
You use a POST
request to create a new application.
nexmo_application.createApplication({}, context)
- input
object
- body
object
- answer_method
string
: The HTTP method used to make the request toanswer_url
. The default value isGET
. - answer_url
string
: The URL where your webhook delivers the Nexmo Call Control Object that governs this call. As soon as your user answers a call Nexmo makes a request toanswer_url
. Required for inbound calls only. - api_key required apiKey
- api_secret required apiSecret
- event_method
string
: The HTTP method used to send event information toevent_url
. The default value isPOST
. Forvoice
type applications only. - event_url
string
: Nexmo sends event information asynchronously to this URL when status changes forvoice
applications. Always required forvoice
applications. - inbound_method
string
: The HTTP method used to send event information toinbound_url
. The default value isPOST
. Formessages
type applications only. - inbound_url
string
: Nexmo sends a request to this URL when an inbound message is received. Required formessages
type applications only. - name required
string
: The name of your application. - status_method
string
: The HTTP method used to send event information tostatus_url
. The default value isPOST
. Formessages
type applications only. - status_url
string
: Nexmo sends event information asynchronously to this URL when status changes. Required formessages
type applications only. - type required
string
(values: voice, messages): The Nexmo product or products that you access with this application. Currentlyvoice
andmessages
application types are supported.
- answer_method
- body
- output applicationCreated
You use a DELETE
request to delete a single application.
nexmo_application.deleteApplication({
"app_id": ""
}, context)
- input
object
- app_id required
string
: The ID allocated to your application by Nexmo.
- app_id required
Output schema unknown
You use a GET
request to retrieve details about a single application.
nexmo_application.retrieveApplication({
"api_key": "",
"api_secret": "",
"app_id": ""
}, context)
- input
object
- api_key required
string
: You can find your API key in your account overview - api_secret required
string
: You can find your API secret in your account overview - app_id required
string
: The ID allocated to your application by Nexmo.
- api_key required
- output application
You use a PUT
request to update an existing application.
nexmo_application.updateApplication({
"app_id": ""
}, context)
- input
object
- app_id required
string
: The ID allocated to your application by Nexmo. - body
object
- answer_method
string
: The HTTP method used to make the request toanswer_url
. The default value isGET
. - answer_url
string
: The URL where your webhook delivers the Nexmo Call Control Object that governs this call. As soon as your user answers a call Nexmo makes a request toanswer_url
. - api_key required apiKey
- api_secret required apiSecret
- event_method
string
: The HTTP method used to send event information toevent_url
. The default value is POST. - event_url
string
: Nexmo sends event information asynchronously to this URL when status changes. - name required
string
: The name of your application. - type required
string
(values: voice, messages): The Nexmo product or products that you access with this application. Currentlyvoice
andmessages
application types are supported. You can't change the type of application.
- answer_method
- app_id required
- output application
- apiKey
string
: You can find your API key in your account overview
- apiSecret
string
: You can find your API secret in your account overview
- application
object
- _links links
- id applicationBase/properties/id
- keys keys
- messages required messages
- name required applicationBase/properties/name
- voice required voice
- applicationBase
object
- id
string
: The ID allocated to your application by Nexmo. - name
string
: The name of your application
- id
- applicationCreated
- _links links
- id applicationBase/properties/id
- keys keys
- messages required messages
- name required applicationBase/properties/name
- voice required voice
- keys keysWithPrivateKey
- applications
object
- _embedded required applicationsBase/properties/_embedded
- _links required links
- count required applicationsBase/properties/count
- page_index required applicationsBase/properties/page_index
- page_size required applicationsBase/properties/page_size
- applicationsBase
object
- _embedded
object
- applications
array
: The collection of your applications. Each object contains information about an an individual application. The public_key is not included in the application information.- items application
- applications
- count
integer
: The number of items associated with your account. - page_index
integer
: The offset from the first page. - page_size
integer
: The number of items returned on each call to this endpoint. The default is 10 records.
- _embedded
- keys
object
: The Nexmo product that you access with this application.- public_key
string
: The public key used to validate the JWT.
- public_key
- keysWithPrivateKey
- public_key
string
: The public key used to validate the JWT. - private_key
string
: The private key you use to generate the JSON Web Token (JWT) that authenticates your requests to Messages API.
- public_key
- links
object
: A series of links between resources in this API in the following HAL specification.- href
string
: The link URL.
- href
- messages
object
: The Nexmo product that you access with this application.- webhooks
array
- items
object
- endpoint required
string
:inbound_url
: The URL where inbound messages are delivered.status_url
: The URL where message status is delivered. - endpoint_type required
string
(values: inbound_url, status_url) - http_method required
string
(values: GET, POST): The HTTP method used to send data to theinbound_url
orstatus_url
. Default is POST.
- endpoint required
- items
- webhooks
- voice
object
: The Nexmo product that you access with this application.- webhooks
array
- items
object
- endpoint required
string
:answer_url
: The URL where your webhook delivers the Nexmo Call Control Object that governs this call. As soon as your user answers a call Nexmo makes a request to answer_url.event_url
: Nexmo sends event information asynchronously to this URL when status changes. - endpoint_type required
string
(values: answer_url, event_url) - http_method required
string
(values: GET, POST): The HTTP method used to send event information to theevent_url
oranswer_url
.
- endpoint required
- items
- webhooks