API Tokens
In order to access the data via our API, you must issue an API token from your account settings page.
Once you have an API token, you will need to include it in your request headers as a Bearer token, like so:
Authorization: Bearer {token}
Guzzle example
Here's an example PHP request using the popular Guzzle library:
// Setup the HTTP client
$client = new GuzzleHttp\Client([
'base_uri' => 'https://belltastic.com/api/v1',
'headers' => [
'Authorization' => 'Bearer user_Z6Hg21BcXPwqCJb1FTzqUC6URZTdTigbi0vyFmnL'
]
])
// Make a request to retrieve available projects
$response = $client->get('projects');
Laravel HTTP example
Here's another example using the Laravel's integrated HTTP library:
use Illuminate\Support\Facades\Http;
$response = Http::withOptions([
'base_uri' => 'https://belltastic.com/api/v1',
])
->withToken('user_Z6Hg21BcXPwqCJb1FTzqUC6URZTdTigbi0vyFmnL')
->get('projects');