GETTOKEN
GETTOKEN
GET
/
api
/
v3
/
respondents
/
get_token
/
{publishable_key}
GETTOKEN
curl --request GET \
--url https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}import requests
url = "https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}', 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://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"tokens": [
"7d8f...a1",
"b3c9...e2"
]
}Generates single-use SHA-256 tokens for the V3 server-to-server flow, which hides sensitive SEARCH/REVIEW scores behind a server-side response.
Call this client-side with your publishable key. Generate 1–10 tokens per call with the
tokens= parameter (defaults to 1). Each token can be used for one transaction and cannot be reused. Pass the returned token in the header of the subsequent SEARCH or REVIEW call, along with your private key.
See the Server-to-Server Integration guide for the full workflow.Path Parameters
Your Research Defender publishable key (client-side).
Query Parameters
Number of tokens to generate (1–10). Defaults to 1.
Optional panelist ID (only for customers who know respondent identity).
Optional hashed email (only for customers who know respondent identity).
Response
200 - application/json
One or more single-use SHA-256 tokens.
A single-use SHA-256 token.
Was this page helpful?
GETTOKEN
curl --request GET \
--url https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}import requests
url = "https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}', 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://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.rtymgt.com/api/v3/respondents/get_token/{publishable_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"tokens": [
"7d8f...a1",
"b3c9...e2"
]
}