Skip to main content
Version: Next

Usage

In this section we'll be taking a look at how to use Secured Signal API.

Basic

Here is a quick command to see if you've correctly followed the setup instructions:

curl -X POST \
-H "Content-Type: application/json" \
-d '{"message":"Hello, World!", "number":"<from>", "recipients":["<to>"]}' \
'http://sec-signal-api:8880/v2/send'

This will send Hello, World! to <to> from <from>.

Auth

Secured Signal API implements 5 auth methods:

MethodExample
Bearer AuthAdd Authorization: Bearer API_TOKEN to headers
Basic AuthAdd Authorization: Basic BASE64_STRING (api:API_TOKEN)
Query AuthAppend @auth=API_TOKEN to request URL
Path AuthPrepend request path with /@auth=API_TOKEN/
Body AuthSet auth to API_TOKEN in the request body
warning

Query and Path auth are disabled by default and must be enabled in the config

Example:

curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer API_TOKEN" \
-d '{"message":"Hello, World!", "number":"<from>", "recipients":["<to>"]}' \
'http://sec-signal-api:8880/v2/send'