Retrieve user access token
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/accountant/userToken \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data userId=import requests
url = "https://sandbox.hurdlr.com/rest/v5/accountant/userToken"
payload = { "userId": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({userId: ''})
};
fetch('https://sandbox.hurdlr.com/rest/v5/accountant/userToken', 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://sandbox.hurdlr.com/rest/v5/accountant/userToken",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "userId=",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://sandbox.hurdlr.com/rest/v5/accountant/userToken"
payload := strings.NewReader("userId=")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/accountant/userToken")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("userId=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/accountant/userToken")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "userId="
response = http.request(request)
puts response.read_body{
"access_token": "00f6b2b68eb9459eab681d19aa86c6154e225068f3074d1d9b639316d5380a4c.91d620872c3b438ba33f4baaca124624",
"expires_in": 7776000,
"created_at": 1599065168,
"scope": "token"
}Accountant
Retrieve user access token
Retrieve an access token of a user for the authenticated accountant
POST
/
v5
/
accountant
/
userToken
Retrieve user access token
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/accountant/userToken \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data userId=import requests
url = "https://sandbox.hurdlr.com/rest/v5/accountant/userToken"
payload = { "userId": "" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({userId: ''})
};
fetch('https://sandbox.hurdlr.com/rest/v5/accountant/userToken', 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://sandbox.hurdlr.com/rest/v5/accountant/userToken",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "userId=",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://sandbox.hurdlr.com/rest/v5/accountant/userToken"
payload := strings.NewReader("userId=")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/accountant/userToken")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("userId=")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/accountant/userToken")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "userId="
response = http.request(request)
puts response.read_body{
"access_token": "00f6b2b68eb9459eab681d19aa86c6154e225068f3074d1d9b639316d5380a4c.91d620872c3b438ba33f4baaca124624",
"expires_in": 7776000,
"created_at": 1599065168,
"scope": "token"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/x-www-form-urlencoded
Id of the user in your DB
⌘I