EC5 API

Testing EC5 API

HTML

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

JavaScript

var params = {
   grant_type: 'client_credentials',
   client_id: 2,
   client_secret: 'QowjYIFrWbzLEwttXzuTnb20OPbRWwlPlaNLQ6VW'
 }

 $.ajax({
   url: 'https://test.epicollect.net/api/oauth/token',
   type: 'POST',
   contentType: 'application/vnd.api+json',
   data: JSON.stringify(params),
   success: function(response) {
     console.log(JSON.stringify(response));
   },
   error: function(xhr, status, error) {
     console.log(xhr.responseText);
   }
 });