Skip to content

Access Token Authentication

dgmyrek edited this page Mar 21, 2018 · 1 revision

If you've been provided with a permanent, non-expiring access token (bearer token) this authentication method allows you to skip all tasks that require user authorization handling and begin retrieving data from the API immediately.

Example

 require_once("lib/Core.php");

 $api = new SparkAPI_Bearer("your_token_here");

 // identify your application (optional)  
 $api->SetApplicationName("PHP-API-Code-Examples/1.0"); 

 $listings = $api->getListings();  
 var_dump($listings);  

Spark Platform Documentation

Access Token Authentication