Always use HTTPS with all calls.
For API Access, contact dev@usft.com.
When you contact US Fleet Tracking for API access, you'll recieve something like this, which contains your API Key and Secret:
Help documentation: https://api.usft.com/help/v1/Authentication Along with your username, this is used with our .Net or Java based clients. (https://github.com/usft) Api Key: {key} This can be used to access our API without using one of our clients. Basic Authentication Api Key: {key} Api Secret: {secret}
The {key} is combined with your login username for our .Net/Java clients like so:
var usftClient = new UsftClient("username", "{key}", "https://api.usft.com/v1/");
From here you'll be able to make calls like
var addresses = usftClient.GetAddresses();
If you need or simply prefer to make your own calls to our API we also support the Basic Auth. model.
Simply use the {key} as the Username. And the {secret} as the Password.
dM9Nb5AvsRnl0m2Tca9B4LQoqmi9bAy5:LvxZlerXdAeRuxZTZ070Bk9S6Lv66VBe
ZE05TmI1QXZzUm5sMG0yVGNhOUI0TFFvcW1pOWJBeTU6THZ4WmxlclhkQWVSdXhaVFowNzBCazlTNkx2NjZWQmU=
Authorization: Basic ZE05TmI1QXZzUm5sMG0yVGNhOUI0TFFvcW1pOWJBeTU6THZ4WmxlclhkQWVSdXhaVFowNzBCazlTNkx2NjZWQmU=
var username = "dM9Nb5AvsRnl0m2Tca9B4LQoqmi9bAy5"; var pass = "LvxZlerXdAeRuxZTZ070Bk9S6Lv66VBe"; var tokenBytes = Encoding.UTF8.GetBytes($"{username}:{pass}"); var token = Convert.ToBase64String(tokenBytes); var client = new RestClient("https://api.usft.com/v1/test/"); // alternatively, basic auth is supported natively // client.Authenticator = new HttpBasicAuthenticator(username, pass); var request = new RestRequest(Method.GET); request.AddHeader("authorization", $"Basic {token}"); request.AddHeader("content-type", "application/json"); IRestResponse response = client.Execute(request); // content string var content = response.Content;