GETTOKEN
GETTOKEN (new stack)
GET
/
token
GETTOKEN (new stack)
curl --request GET \
--url https://prod.resdefio.com/token \
--header 'x-api-key: <api-key>'import requests
url = "https://prod.resdefio.com/token"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://prod.resdefio.com/token', 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.resdefio.com/token",
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>"
],
]);
$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.resdefio.com/token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://prod.resdefio.com/token")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.resdefio.com/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Results": [
{
"API": "<string>",
"Tokens": [
"<string>"
],
"Event_Time": "<string>",
"Message": "<string>"
}
]
}Generates single-use SHA-256 tokens on the
resdefio.com stack for ACTIVITY. Set api to the product the token is for and tokens to the number of tokens (1–10). panel_id and hashed_email bind the token to a known respondent when available.
For tokens used with SEARCH and REVIEW (V3), use GETTOKEN on rtymgt.com.Authorizations
API key issued for the resdefio.com APIs.
Query Parameters
Product the token is generated for.
Number of tokens to generate (1–10).
Optional panelist ID.
Optional hashed email.
Response
200 - application/json
One or more single-use SHA-256 tokens.
Show child attributes
Show child attributes
Was this page helpful?
GETTOKEN (new stack)
curl --request GET \
--url https://prod.resdefio.com/token \
--header 'x-api-key: <api-key>'import requests
url = "https://prod.resdefio.com/token"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://prod.resdefio.com/token', 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.resdefio.com/token",
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>"
],
]);
$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.resdefio.com/token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<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://prod.resdefio.com/token")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.resdefio.com/token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"Results": [
{
"API": "<string>",
"Tokens": [
"<string>"
],
"Event_Time": "<string>",
"Message": "<string>"
}
]
}