API Access

You need to register or sign in to gain access to the API.

Creating Requests

All requests to the Playlists.net REST API must use the GET method. It is important to note that a simple level of authentication is implemented within the API. To show this we will use the following example URL, which returns the 10 most recently submitted playlists:

http://playlists.net/api/v2?method=smp.playlists.getList&page=1&per_page=10&orderby=created&orderby_direction=DESC

All requests must contain two additional parameters; your public_key & a signature. Your public_key is given to you when you sign up for API access. The signature parameter is created by connecting your public key, private key and a current timestamp into a single sring and then performing a sha256 hash on that value. For instance, in PHP this would look like:

<?php
$public_key = 'mypublickey123';
$private_key = 'myprivatekey123';
$timestamp = time();

$signature = hash('sha256', $public_key.$private_key.$timestamp);
?>

The URL will now look like the following example, where mypublickey123 is replaced with your actual public_key value and the signature has been populated:

http://playlists.net/api/v2?method=smp.playlists.getList&page=1&per_page=10&orderby=created&orderby_direction=DESC&public_key=mypublickey123&signature=aea939cf1e3db6725bcfed5de3806e0f2b3b4199