The Persephony Javascript SDK will allow you to easily use the Persephony API in a Javascript application.
npm install @persephony/sdk --save
yarn add @persephony/sdk
Test the SDK is working by sending yourself a text message.
var persephonySDK = require('@persephony/sdk')
var persy = persephonySDK('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'your_auth_token')
var to = 'your_phone_number'
var from = 'a_persephony_phone_number_in_your_account'
persy.api.messages.create(from, to, 'Welcome to Persephony!')
When you run this code you should get a text message. This indicates that you've successfully setup your SDK.
The Persephony documentation has guides on getting started with Persephony, as well as the API reference, PerCL reference, and several useful tutorials.
The SDK documentation is not generated from source code comments, as at the time of writing no existing tool could be found that parsed the comments adequately. Instead the documentation is manually curated in the files at docs/source
in the .rst (ReStructuredText) format. Developers should ensure that changes to the SDK are reflected in the documentation.
It is built using the Python package Sphinx and a few other libraries. To install the dependencies in a python virtual environment, run setup.sh.
To generate the documentation, activate the virtual environment and run make html
. For livereload, run make watch
If you are experiencing difficulties, contact our support team at support@persephony.com