Getting started

Getting Started

API Basics

APIs

Authentication

Blocklists

Call Channels

Call Center

Call Recordings

Devices

Pivot

Quickcall

Webhooks

Business SMS

VirtualText

Automation

Zapier

Use cases

Create Trello Card for Voicemails Received

Send Call Data to Google Sheets

Slack Notifications from Call Events

SMS Airtable Template

Trigger SMS Messages from Your CRM

Zapier Webinar Recording

About Authentication

The Dash API requires you to provide an authentication token with each request.

Using your username and password, along with an account company, you may issue an API call to user_auth to generate an authentication token.

Using your account's API token you may issue an API call to api_auth to generate an authentication token. If you're building server applications, this is the best way to authenticate your application.

This is the same as authenticating as a user, except you supplying the API key as data.

Once an authentication token is generated, it may be used for subsequent API calls. The Token will expire after a period of inactivity. You may reuse the same token for a series of API requests.

Creating User Auth Token

When creating an Authentication Token, you must hash the password prior to submitting the user_auth request.

API

Method: PUT

<https://public-api.virtualpbx.com:8443/v2/user_auth>

Payload

{
  "data": {
    "credentials": "{{password_hash}}",
    "account_name": "{{account_name}}"
  }
}

Hash the user credentials

On Unix-like systems using Shell:

PASSWORD=`echo -n username:password | md5sum | awk '{print $1}'`

On Windows using PowerShell:

[BitConverter]::ToString((New-Object System.Security.Cryptography.MD5CryptoServiceProvider).ComputeHash([System.Text.Encoding]::UTF8.GetBytes("username:password"))).Replace('-', '').ToLower()

The following request will create an authentication token. The string in auth_token field contains the authentication token.

Request response

JSON

{
    "auth_token": "{AUTH_TOKEN}",
    "data": {
        "account_id": "{ACCOUNT_ID}",
        "apps": [],
        "is_reseller": true,
        "language": "en-US",
        "owner_id": "{OWNER_ID}",
        "reseller_id": "{RESELLER_ID}"
    },
    "request_id": "{REQUEST_ID}",
    "revision": "{REVISION}",
    "status": "success"
}

CURL Example

curl --location --request PUT '<https://public-api.virtualpbx.com:8443/v2/user_auth>' \\
--header 'Content-Type: application/json' \\
--data-raw '{
  "data": {
    "credentials": "{{password_hash}}",
    "account_name": "{{account_name}}"
  }
}'

← Previous

Add link here

Next →

Add link here