Authentication
Create Token
POST
/
tokens
Tokens
curl --request POST \
--url https://demand.researchdesk.com/tokens \
--header 'Content-Type: application/json' \
--data '
{
"email": "{{email}}",
"password": "{{password}}"
}
'import requests
url = "https://demand.researchdesk.com/tokens"
payload = {
"email": "{{email}}",
"password": "{{password}}"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '{{email}}', password: '{{password}}'})
};
fetch('https://demand.researchdesk.com/tokens', 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://demand.researchdesk.com/tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '{{email}}',
'password' => '{{password}}'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://demand.researchdesk.com/tokens"
payload := strings.NewReader("{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://demand.researchdesk.com/tokens")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demand.researchdesk.com/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}"
response = http.request(request)
puts response.read_body{
"token": "eyJraWQiOiJuNG93MStFaVdQeThpSVJLR2o1YXNvaURJTmNWNnJPaG9UWDNrXC9JN05Vaz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzNDQ4OTQ0OC03MDgxLTcwYjItN2NkZC00MDEzZWU5YjkzMmQiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV80UEVLNUpncHgiLCJjbGllbnRfaWQiOiI0c2JoczN1dDMxaTE5b2lpY2lmNmlocGpuMSIsIm9yaWdpbl9qdGkiOiIyMzJjYmQ3My05YmEzLTQyM2MtYTU5YS1lYmJmMDM3MjJhZGIiLCJldmVudF9pZCI6IjA0YWI2MTEwLTA3ZGEtNDZmYy04N2MwLTY0ODAyYzgzNzZmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE3Mzc0OTYxNjQsImV4cCI6MTczNzUwNjk2NCwiaWF0IjoxNzM3NDk2MTY0LCJqdGkiOiIxOTlhM2M0YS0yYTJkLTQxMjgtOWQ4Mi01YmQ3YjFjMGYwZTAiLCJ1c2VybmFtZSI6IjM0NDg5NDQ4LTcwODEtNzBiMi03Y2RkLTQwMTNlZTliOTMyZCJ9.gFI515igfGK9wNijA0fI-usEyaDatdJG5GZK0_byZoPWGQ9VoViaU1TZ_CtyI-rG6DN_-DJ3IBaUtrXbRZb8LIGRs8bvzKRdSyE3fRAsYht7NlczRRVH2w0TkgRX_8O8FZWERbOT2d3FfS_WVh5TG15QZGXmJBaTwTjKkxtQ5WZg_QGIocXfFA5j5vFOmKXEFsp_r7VzDA12BQBGaSq99li0aGLlROGY-svzskS_HUzlP3zRGuaaKv1vte0DUqC-4FMADhnSqw0pFvJcU6W5F3snuqRaHyKYD0g5Q3UBYm4fgBw-CHXz8jzB43yHU_I_X70OlOFWDjFwoONwX8-HXQ",
"expires": "2025-01-22 00:49:23.552399"
}Rate limit: 5 requests/hour, per email address
Email and password combinations are required to generate tokens which are used for authorizing subsequent API calls. Tokens are accepted for 12 hours after generation; it is suggested to store the token in a cookie governed by timestamp logic, although it is acceptable to attempt API actions to determine token validity and re-authenticate as necessary. The token is passed as
Authorization in the header for all subsequent calls.
Email addresses are unique and must be associated with an active user object.
For assistance with your login credentials or access to Production and Staging environments, please email clientsuccess@repdata.com.Was this page helpful?
⌘I
Tokens
curl --request POST \
--url https://demand.researchdesk.com/tokens \
--header 'Content-Type: application/json' \
--data '
{
"email": "{{email}}",
"password": "{{password}}"
}
'import requests
url = "https://demand.researchdesk.com/tokens"
payload = {
"email": "{{email}}",
"password": "{{password}}"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({email: '{{email}}', password: '{{password}}'})
};
fetch('https://demand.researchdesk.com/tokens', 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://demand.researchdesk.com/tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => '{{email}}',
'password' => '{{password}}'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://demand.researchdesk.com/tokens"
payload := strings.NewReader("{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://demand.researchdesk.com/tokens")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://demand.researchdesk.com/tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"{{email}}\",\n \"password\": \"{{password}}\"\n}"
response = http.request(request)
puts response.read_body{
"token": "eyJraWQiOiJuNG93MStFaVdQeThpSVJLR2o1YXNvaURJTmNWNnJPaG9UWDNrXC9JN05Vaz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiIzNDQ4OTQ0OC03MDgxLTcwYjItN2NkZC00MDEzZWU5YjkzMmQiLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAudXMtZWFzdC0xLmFtYXpvbmF3cy5jb21cL3VzLWVhc3QtMV80UEVLNUpncHgiLCJjbGllbnRfaWQiOiI0c2JoczN1dDMxaTE5b2lpY2lmNmlocGpuMSIsIm9yaWdpbl9qdGkiOiIyMzJjYmQ3My05YmEzLTQyM2MtYTU5YS1lYmJmMDM3MjJhZGIiLCJldmVudF9pZCI6IjA0YWI2MTEwLTA3ZGEtNDZmYy04N2MwLTY0ODAyYzgzNzZmMyIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoiYXdzLmNvZ25pdG8uc2lnbmluLnVzZXIuYWRtaW4iLCJhdXRoX3RpbWUiOjE3Mzc0OTYxNjQsImV4cCI6MTczNzUwNjk2NCwiaWF0IjoxN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