Authentication

Callr support two authentication methods:

API-Key header

When using an API Key, you can send it as an x-api-key HTTP header:

curl --request GET \
     --url https://api.callr.com/v2.0/ping \
     --header 'accept: application/json' \
     --header 'x-api-key: <callr-api-key>'
GET /v2.0/ping HTTP/2
Host: api.callr.com
accept: application/json
x-api-key: <callr-api-key>

Basic Authentication

You may also use HTTP Basic Authentication, by sending your main account SID as the user, and your API key as the password.

curl --request GET \
     --url https://api.callr.com/v2.0/ping \
     --header 'accept: application/json' \
     --user '<your-account-sid>:<your-api-key>'
GET /v2.0/ping HTTP/2
Host: api.callr.com
authorization: Basic PHlvdXItYWNjb3VudC1zaWQ+OjxjYWxsci1hcGkta2V5Pg==
accept: application/json

Sub Accounts

If you have sub accounts, you can act as a sub account by sending the sub account SID as the user, and your master account API key as the password.

curl --request GET \
     --url https://api.callr.com/v2.0/ping \
     --header 'accept: application/json' \
     --user '<your-sub-account-sid>:<your-master-account-api-key>'
GET /v2.0/ping HTTP/2
Host: api.callr.com
authorization: Basic PHlvdXItc3ViLWFjY291bnQtc2lkPjo8eW91ci1tYXN0ZXItYWNjb3VudC1hcGkta2V5Pg==
accept: application/json