API's authentication uses OAUTH 2 protocol..
You must provide 'access_token' parameter to your API calls.
PHP
$urlToken = 'https://mtxserv.com/oauth/v2/token?'; $query = array( 'grant_type' => 'https://mtxserv.com/grants/api_key', 'client_id' => '', 'client_secret' => '', 'api_key' => '' ); $response = file_get_contents($urlToken . http_build_query($query)); var_dump($response); // contain access token
JAVASCRIPT
var urlToken = 'https://mtxserv.com/oauth/v2/token'; var query = { grant_type: 'https://mtxserv.com/grants/api_key', client_id: '', client_secret: '', api_key: '' }; $.ajax({ url: urlToken, dataType: 'json', data: query, success: function(data) { console.log(data); // contain access token }, error: function(data) { console.log(data.responseText); } });