Authentication
Provide your secret key as the bearer token using the HTTP bearer token authentication scheme.
This is simply a HTTP header in the format:
Authorization: Bearer <your_secret_key>
Example code
- cURL
- Ruby
- Node
- PHP
- Python
- Go
- .NET
- Java
curl https://app.hitprobe.com/api/v1/me \
-H "Authorization: Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee"
require 'net/http'
uri = URI('https://app.hitprobe.com/api/v1/me')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee'
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
import fetch from 'node-fetch';
fetch('https://app.hitprobe.com/api/v1/me', {
headers: {
'Authorization': 'Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee'
}
});
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->get('https://app.hitprobe.com/api/v1/me', [
'headers' => [
'Authorization' => 'Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee'
]
]);
import requests
headers = {
'Authorization': 'Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee',
}
response = requests.get('https://app.hitprobe.com/api/v1/me', headers=headers)
package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://app.hitprobe.com/api/v1/me", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
using System.Net.Http;
HttpClient client = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "https://app.hitprobe.com/api/v1/me");
request.Headers.Add("Authorization", "Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee");
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://app.hitprobe.com/api/v1/me"))
.GET()
.setHeader("Authorization", "Bearer 4d5d94e5f2e9-7408-4fee-9e42-3748eaee")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());