Latest Legacy

Authentication

All requests to VTS API are authenticated with BasicAuth using your AUTH ID and AUTH TOKEN. You can see your VTS AUTH ID and AUTH TOKEN at the top of the Overview page of the VTS console.

Example Request

1
2
3
4
5
6
7
import vts

proxies = {
    'http': 'https://username:password@proxyurl:proxyport',
    'https': 'https://username:password@proxyurl:proxyport'
    }
client = vts.RestClient('<auth_id>', '<auth_token>', proxies=proxies,timeout=5)
1
2
3
4
5
6
7
8
9
10
require 'rubygems'
require 'vts'

proxy = {
	proxy_host: "https://proxyurl",
	proxy_port: "proxyport",
	proxy_user: "username",
	proxy_pass: "password"
}
api = RestClient.new("<auth_id>", "<auth_token>", proxy, timeout=5)
1
2
3
4
5
6
7
8
9
10
11
12
var vts = require('vts');
let options = {
	'timeout': 50000, //ms
	'host': 'https://proxyurl',
	'port': 'proxyport',
	auth: {
		username: 'my-user',
		password: 'my-password'
	}
}

var client = new vts.Client("<auth_id>", "<auth_token>", options);
1
2
3
4
5
6
<?php
require 'vendor/autoload.php';
use vts\RestClient;

$client = new RestClient("<auth_id>", "<auth_token>", "<https://proxyurl>", "<proxyport>", "<username>", "<password>");
$client->client->setTimeout(5)
1
2
3
4
5
6
7
8
9
package net.vtscom.api.samples.application;

import net.vtscom.api.VTS;

class AutheExample {
  public static void main(String [] args) {
    VTS.init();
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
using System;
using System.Collections.Generic;
using vts;

namespace VTSExamples {
  internal class Program {
    public static void Main(string[] args) {
      var api = new VTSApi(
        "<auth_id>", "<auth_token>",
        "<https://proxyurl>", "<proxyport>", "<username>", "<password>");
      api.Client.SetTimeout(10);
    }
  }
}
1
2
3
4
5
6
7
8
9
10
package main

import "github.com/vts/vts-go/v7"

func main() {
	client, err := vts.NewClient("<auth_id>", "<auth_token>", &vts.ClientOptions{})
	if err != nil {
		panic(err)
	}
}