Authentication

  • You will need to obtain an Access Token in order to access the API
  • IMPORTANT: The Access Token expires in 24 hours from the time you create it. You will need to request a new token every 24 hours
  • We use OAuth for authentication (Barrier Token)

Use Case

  1. Obtain your ClientID and API PIN# from our support department. Create a Support Ticket
  2. Using your ClientID and API PIN#, create your Access Token
[POST] https://secure.autoguardtracking.com/WebApi/api/Token

Request Parameters

Below parameters should be included in the request to get your Access Token

Parameter Name Description
ClientId ClientID supplied by the AutoGuard support department.
Pin Pin supplied by the AutoGuard support department.

Create Credentials object

Once you receive your ClientId and PIN from AutoGuard Support, you can create an Access Token using an HTTP POST request. Below is a sample request:


var client = new HttpClient();
var values = new Dictionary
{
   { "ClientId", "[YOUR_CLIENT_ID]" },
   { "Pin", "[YOUR_PIN]" }
};
var content = new FormUrlEncodedContent(values);
var response = await client.PostAsync("https://secure.autoguardtracking.com/WebApi/api/Token", content);
var responseString = await response.Content.ReadAsStringAsync();
//responseString will contain a Credential Object in JSON format
$.post("https://secure.autoguardtracking.com/WebApi/api/Token", 
{ 
    ClientId : [YOUR_CLIENT_ID],
    Pin: [YOUR_PIN]
}, 
function (data) {
    //data object will contain the response as a JSON object.
});

Sample Credentials object

$.post("https://secure.autoguardtracking.com/WebApi/api/Token", 
{ 
    ClientId : [YOUR_CLIENT_ID],
    Pin: [YOUR_PIN]
}, 
function (data) {
        //data object will contain the response as a JSON object.
});

A successful request will return the following JSON result:

{
    "StatusCode": "200",
    "Message": "OK",
    "Data": {
            "Token":"cc4d35e4b4244e5b8b3cf10da2ef37a4"
        }
}

Test

Test the Access Token using the test ClientID and PIN below or use the one you obtained from AutoGuard Support by entering each in the respective fields below:

  • Test ClientID: 3734
  • Test PIN: 517