Get active consent
curl --request GET \
--url https://api.proofage.net/v1/consent \
--header 'X-API-Key: <api-key>' \
--header 'X-HMAC-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>'import requests
url = "https://api.proofage.net/v1/consent"
headers = {
"X-API-Key": "<api-key>",
"X-HMAC-Signature": "<api-key>",
"X-Timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-API-Key': '<api-key>',
'X-HMAC-Signature': '<api-key>',
'X-Timestamp': '<api-key>'
}
};
fetch('https://api.proofage.net/v1/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.proofage.net/v1/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>",
"X-HMAC-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.proofage.net/v1/consent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-HMAC-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.proofage.net/v1/consent")
.header("X-API-Key", "<api-key>")
.header("X-HMAC-Signature", "<api-key>")
.header("X-Timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proofage.net/v1/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
request["X-HMAC-Signature"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"version": 2,
"text_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"url": "https://app.proofage.net/consent"
}{
"error": {
"code": "RATE_LIMIT",
"message": "Too many requests. Please try again later."
}
}Consent
Get active consent
Returns the currently active consent version that must be presented to and accepted by the end-user.
GET
/
consent
Get active consent
curl --request GET \
--url https://api.proofage.net/v1/consent \
--header 'X-API-Key: <api-key>' \
--header 'X-HMAC-Signature: <api-key>' \
--header 'X-Timestamp: <api-key>'import requests
url = "https://api.proofage.net/v1/consent"
headers = {
"X-API-Key": "<api-key>",
"X-HMAC-Signature": "<api-key>",
"X-Timestamp": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-API-Key': '<api-key>',
'X-HMAC-Signature': '<api-key>',
'X-Timestamp': '<api-key>'
}
};
fetch('https://api.proofage.net/v1/consent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.proofage.net/v1/consent",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>",
"X-HMAC-Signature: <api-key>",
"X-Timestamp: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.proofage.net/v1/consent"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-HMAC-Signature", "<api-key>")
req.Header.Add("X-Timestamp", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.proofage.net/v1/consent")
.header("X-API-Key", "<api-key>")
.header("X-HMAC-Signature", "<api-key>")
.header("X-Timestamp", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proofage.net/v1/consent")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
request["X-HMAC-Signature"] = '<api-key>'
request["X-Timestamp"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 1,
"version": 2,
"text_sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"url": "https://app.proofage.net/consent"
}{
"error": {
"code": "RATE_LIMIT",
"message": "Too many requests. Please try again later."
}
}Authorizations
apiKey & hmacSignature & requestTimestampapiKey & hmacSignature
Current Unix time in seconds, signed as "{X-Timestamp}." + the canonical request. Recommended on every signed request and required when the workspace requires it; accepted within 300 seconds of the server clock, and a timestamped request other than GET is accepted once.