API

All actions available in your manager can be use via our API.

API is still in beta version.
Documentation will be updated soon with severals examples :

  • Authentication examples (API/JS)
  • Create a custom server status for a website (API/HTML/JS)
  • Create a custom browser (API/HTML/JS)
  • ...

If you have any particular needs, contact the support.


SDK PHP

The mTxServ SDK for PHP enables PHP developers to easily integrate our API into your applications.

Access to PHP SDK


Authentication

API's authentication is using OAUTH 2 protocol.

You must provide 'access_token' parameter to your API calls.

PHP
$urlToken = 'https://www.mtxserv.fr/oauth/v2/token?';

$query = array(
    'grant_type'    => 'https://www.mtxserv.fr/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://www.mtxserv.fr/oauth/v2/token';

var query = {
    grant_type:     'https://www.mtxserv.fr/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);
    )
});

OAuth EndPoint

Auth https://www.mtxserv.fr/oauth/v2/auth
Token https://www.mtxserv.fr/oauth/v2/token