@datafire/nexmo_application
v3.0.0
Published
DataFire integration for Nexmo Application API
Readme
@datafire/nexmo_application
Client library for Nexmo Application API
Installation and Usage
npm install --save @datafire/nexmo_applicationlet nexmo_application = require('@datafire/nexmo_application').create();
.then(data => {
console.log(data);
});Description
Actions
retrieveApplications
You use a GET request to retrieve details of all applications associated with your account.
nexmo_application.retrieveApplications({
"api_key": "",
"api_secret": ""
}, context)Input
- 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
- output applications
createApplication
You use a POST request to create a new application.
nexmo_application.createApplication({}, context)Input
- 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. Forvoicetype applications only. - event_url
string: Nexmo sends event information asynchronously to this URL when status changes forvoiceapplications. Always required forvoiceapplications. - inbound_method
string: The HTTP method used to send event information toinbound_url. The default value isPOST. Formessagestype applications only. - inbound_url
string: Nexmo sends a request to this URL when an inbound message is received. Required formessagestype 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. Formessagestype applications only. - status_url
string: Nexmo sends event information asynchronously to this URL when status changes. Required formessagestype applications only. - type required
string(values: voice, messages): The Nexmo product or products that you access with this application. Currentlyvoiceandmessagesapplication types are supported.
- answer_method
- body
Output
- output applicationCreated
deleteApplication
You use a DELETE request to delete a single application.
nexmo_application.deleteApplication({
"app_id": ""
}, context)Input
- input
object- app_id required
string: The ID allocated to your application by Nexmo.
- app_id required
Output
Output schema unknown
retrieveApplication
You use a GET request to retrieve details about a single application.
nexmo_application.retrieveApplication({
"api_key": "",
"api_secret": "",
"app_id": ""
}, context)Input
- 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
- output application
updateApplication
You use a PUT request to update an existing application.
nexmo_application.updateApplication({
"app_id": ""
}, context)Input
- 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. Currentlyvoiceandmessagesapplication types are supported. You can't change the type of application.
- answer_method
- app_id required
Output
- output application
Definitions
apiKey
- apiKey
string: You can find your API key in your account overview
apiSecret
- apiSecret
string: You can find your API secret in your account overview
application
- application
object- _links links
- id applicationBase/properties/id
- keys keys
- messages required messages
- name required applicationBase/properties/name
- voice required voice
applicationBase
- applicationBase
object- id
string: The ID allocated to your application by Nexmo. - name
string: The name of your application
- id
applicationCreated
- applicationCreated
- _links links
- id applicationBase/properties/id
- keys keys
- messages required messages
- name required applicationBase/properties/name
- voice required voice
- keys keysWithPrivateKey
applications
- 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
- 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
- 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
- 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
- links
object: A series of links between resources in this API in the following HAL specification.- href
string: The link URL.
- href
messages
- 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_urlorstatus_url. Default is POST.
- endpoint required
- items
- webhooks
voice
- 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_urloranswer_url.
- endpoint required
- items
- webhooks
