BoxLang 🚀 A New JVM Dynamic Language Learn More...

dialpadcfc

v0.0.8 Modules

dialpadcfc

A CFML wrapper for the Dialpad API. Use it to interact with the Dialpad call and contact center platform to make calls, send SMS, manage your account, and more.

This is an early stage API wrapper and does not yet cover the full Dialpad API. Feel free to use the issue tracker to report bugs or suggest improvements!

Acknowledgements

This project borrows heavily from the API frameworks built by jcberquist. Thanks to John for all the inspiration!

Table of Contents

Quick Start

The following is a quick example of listing the call centers in your account.

dialpad = new path.to.dialpadcfc.dialpad( apiKey = 'xxx' );

callcenters = dialpad.listCallCenters();

writeDump( var='#callcenters.data#' );

Authentication

To get started with the Dialpad API, you'll need an API token .

Once you have this, you can provide it to this wrapper manually when creating the component, as in the Quick Start example above, or via an environment variable named DIALPAD_APIKEY, which will get picked up automatically. This latter approach is generally preferable, as it keeps hardcoded credentials out of your codebase.

Setup

There are several options you can configure when initializing the CFC.

NameTypeDefaultDescription
apiKeystring If you do not provide this via the init method, it must be provided as an environment variable, as explained in the authentication section.
webhookSecretstring Can be provided via an environment variable named DIALPAD_WEBHOOK_SECRET. Used as a default for creating and decoding webhooks, but can be overridden.
baseUrlstringhttps://dialpad.com/api/v2The base endpoint for the API. You shouldn't need to change this, unless you're testing something.
includeRawbooleanfalseWhen set to true, details of each request (HTTP Method, path, query params, payload) will be included in the response struct.
httpTimeoutnumeric50Timeout for http requests, in seconds.

Reference Manual

A full reference manual for all public methods in dialpad.cfc can be found in the docs directory, here.


$ box install dialpadcfc

No collaborators yet.
     
  • {{ getFullDate("2022-09-23T15:09:34Z") }}
  • {{ getFullDate("2024-06-05T21:39:20Z") }}
  • 1,777
  • 2