Most popular language is placed most popular on top. There are two ways I'll show you: native and by using Guzzle library. First let's see how to get all matches of the 22th matchday of the Premiere League by firing an authenticated request:
    $uri = '';
    $reqPrefs['http']['method'] = 'GET';
    $reqPrefs['http']['header'] = 'X-Auth-Token: YOUR_API_TOKEN';
    $stream_context = stream_context_create($reqPrefs);
    $response = file_get_contents($uri, false, $stream_context);
    $matches = json_decode($response);

Though I like the puristic nature of this code, I think using a sophisticated library is way more convient. Assuming you have installed Guzzle via composer you can assemble an authenticated request like so:

    require 'vendor/autoload.php';
    use GuzzleHttp\Client;
    $client = new Client();

    $uri = '';
    $header = array('headers' => array('X-Auth-Token' => 'YOUR_API_TOKEN'));
    $response = $client->get($uri, $header);
    $json = $response->json();

JavaScript / JQuery

That not just looks way nicer but also gives you support and sugar you likely will need in case your projects grows. And when you finally get to that point, you will regret not having spend like 5 minutes to have set it up beforehand.

Using JQuery a request works like so:

  headers: { 'X-Auth-Token': 'YOUR_API_TOKEN' },
  url: ''LIVE',
  dataType: 'json',
  type: 'GET',
}).done(function(response) {
  // do something with the response, e.g. isolate the id of a linked resource   


Firing a small authenticated request using Python 3 looks like so:
import http.client
import json

connection = http.client.HTTPConnection('')
headers = { 'X-Auth-Token': 'YOUR_API_TOKEN' }
connection.request('GET', '/v2/competitions/DED', None, headers )
response = json.loads(connection.getresponse().read().decode())

print (response)


R is a programming language specifically for statistical purposes. Thanks to Karl for submitting that code sample:

url = ''
request = 'v2/competitions/matches?season=2016'
headers = c('X-Auth-Token', 'YOUR_API_TOKEN')
a = GET(paste(url,request,sep=""),