Required integration steps across all programming languagesLearn More

KeyTrac Request Wizard

Create required source code snippets just with a few clicks.

# In case you are using the commandline tool curl to communicate with KeyTrac API.
# For more information visit https://curl.haxx.se

curl -H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: <<YOUR AUTHENTICATION TOKEN>>" \
-d '{"user_id":"<<USER ID>>","samples": []}' \
https://api.keytrac.net/anytext/authenticate
// In case you are using the Unirest PHP client to communicate with KeyTrac API.
// For more information visit http://unirest.io/

require_once "/path/to/unirest-php/src/Unirest.php";

$headers = array("Authorization" => "<<YOUR AUTHENTICATION TOKEN>>", "Content-Type" => "application/json");
$request = json_encode(array("user_id" => "<<USER ID>>", "samples" => []));
$response = Unirest\Request::post("https://api.keytrac.net/anytext/authenticate", $headers, $request);

echo($response->raw_body);
# In case you are using the Unirest Ruby client to communicate with KeyTrac API.
# For more information visit http://unirest.io/

require "unirest"
require "json"

headers  = {"Authorization" => "<<YOUR AUTHENTICATION TOKEN>>", "Content-Type" => "application/json"}
request  = {user_id: "<<USER ID>>", samples: []}
response = Unirest.post("https://api.keytrac.net/anytext/authenticate", headers: headers, parameters: request.to_json) 

puts response.body
# In case you are using the Unirest Python client to communicate with KeyTrac API.
# For more information visit http://unirest.io/

import unirest
import json

headers  = {"Authorization":"<<YOUR AUTHENTICATION TOKEN>>", "Content-Type":"application/json"}
request  = json.dumps({"user_id": "<<USER ID>>", "samples": []})
response = unirest.post('https://api.keytrac.net/anytext/authenticate', headers=headers, params=request)

print(response.raw_body)
// In case you are using the Unirest Java client to communicate with KeyTrac API.
// For more information visit http://unirest.io/

import com.mashape.unirest.http.*;
import com.mashape.unirest.http.exceptions.UnirestException;

public class KeyTrac {
  public static void main(String[] args) throws UnirestException {
    HttpResponse<JsonNode> response = Unirest.post("https://api.keytrac.net/anytext/authenticate")
      .header("Authorization", "<<YOUR AUTHENTICATION TOKEN>>")
      .header("Content-Type", "application/json")
      .body("{\"user_id\":\"<<USER ID>>\", \"samples\":[]}")
      .asJson();

    System.out.println(response.getBody());
  }
}
// In case you are using the Unirest .NET client to communicate with KeyTrac API.
// For more information visit http://unirest.io/

using System;
using unirest_net.http;

class KeyTrac {
  public static void Main (string[] args) {
    HttpResponse<String> response = Unirest.post("https://api.keytrac.net/anytext/authenticate")
      .header("Authorization", "<<YOUR AUTHENTICATION TOKEN>>")
      .header("Content-Type", "application/json")
      .body("{\"user_id\":\"<<USER ID>>\", \"samples\":[]}")
      .asJson<String>();

    Console.WriteLine(response.Body);
  }
}       
// In case you are using the Unirest Node.js client to communicate with KeyTrac API.
// For more information visit http://unirest.io/

var unirest = require('unirest');

unirest.post("https://api.keytrac.net/anytext/authenticate")
.headers({"Authorization": "<<YOUR AUTHENTICATION TOKEN>>", "Content-Type": "application/json"})
.send({"user_id": "<<USER ID>>", "samples": []})
.end(function (response) {
    console.log(response.body);
});
// In case you are using the Unirest Go client to communicate with KeyTrac API.
// For more information visit https://github.com/apimatic/unirest-go

package main

import (
  "fmt"
  "github.com/apimatic/unirest-go"
)

func main() {
  headers := map[string]interface{}{"Authorization": "<<YOUR AUTHENTICATION TOKEN>>", "Content-Type": "application/json"}
  request := `{"user_id": "<<USER ID>>", "samples": []}`
  response, err := unirest.AsBinary(unirest.Post("https://api.keytrac.net/anytext/authenticate", headers, request))
  if err != nil {
    panic(err)
  }

  fmt.Printf("%s\n", response.RawBody)
}

Demo Users