api.voxie.com
is protected by Bearer authorization (RFC7521). We use OAuth 2.0 (RFC6749) and issue JWT tokens (RFC7519, RFC7523).
Issuing and Access Token
The simplest way to acquire an access token is using password flow. Replace $USERNAME
and $PASSWORD
in the following example with your URL encoded (RFC3986) app.voxie.com
username and password, and $SCOPES
with a comma separated list of scopes. The available scopes are:
connections:read
connections:manage
contacts:read
contacts:manage
notifications:trigger
subscriptions:read
subscriptions:manage
$ curl -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=password&username=$USERNAME&password=$PASSWORD&client_id=2&client_secret=1shcfTSQrmgyme7nrqynYEBv4zBlVUIcy7vfg0i0&scope=$SCOPES' 'https://app.voxie.com/oauth/token'
The above endpoint will return response of the format:
{
"token_type" :"Bearer",
"expires_in":28800,
"access_token": "$ACCESSTOKEN",
"refresh_token": "$REFRESHTOKEN"
}
Use of the access token is described in the next subsection. The refresh token can be used to issue a new access token at any time. Below is an example, where $REFRESHTOKEN
should be replaced with a refresh token.
$ curl -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=refresh_token&refresh_token=$REFRESHTOKEN&client_id=2&client_secret=1shcfTSQrmgyme7nrqynYEBv4zBlVUIcy7vfg0i0&scope=$SCOPES' 'https://app.voxie.com/oauth/token'
Using an Access Token
Our access tokens are Bearer tokens, and can be used as follows, replacing $ACCESSTOKEN
with your access token and $TEAMID
with your team ID:
$ curl -H'Authorization: Bearer $ACCESSTOKEN' 'https://api.voxie.com/team/$TEAMID/subscriptions'