Generate a terms of service link
curl --request POST \
--url https://production.hifibridge.com/v2/tos-link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"redirectUrl": "<string>"
}
'import requests
url = "https://production.hifibridge.com/v2/tos-link"
payload = {
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"redirectUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
templateId: '<string>',
redirectUrl: '<string>'
})
};
fetch('https://production.hifibridge.com/v2/tos-link', 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://production.hifibridge.com/v2/tos-link",
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([
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'templateId' => '<string>',
'redirectUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://production.hifibridge.com/v2/tos-link"
payload := strings.NewReader("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://production.hifibridge.com/v2/tos-link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/tos-link")
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/json'
request.body = "{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://dashboard.hifibridge.com/accept-terms-of-service?sessionToken=e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40&redirectUrl=undefined&templateId=2fb2da24-472a-4e5b-b160-038d9dc82a40",
"signedAgreementId": "e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40"
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}Users
Generate a terms of service link
The Terms of Service page must be displayed to the end user. This page can be whitelabeled upon request.
POST
/
v2
/
tos-link
Generate a terms of service link
curl --request POST \
--url https://production.hifibridge.com/v2/tos-link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"redirectUrl": "<string>"
}
'import requests
url = "https://production.hifibridge.com/v2/tos-link"
payload = {
"idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"templateId": "<string>",
"redirectUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotencyKey: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
templateId: '<string>',
redirectUrl: '<string>'
})
};
fetch('https://production.hifibridge.com/v2/tos-link', 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://production.hifibridge.com/v2/tos-link",
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([
'idempotencyKey' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'templateId' => '<string>',
'redirectUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://production.hifibridge.com/v2/tos-link"
payload := strings.NewReader("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://production.hifibridge.com/v2/tos-link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.hifibridge.com/v2/tos-link")
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/json'
request.body = "{\n \"idempotencyKey\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"templateId\": \"<string>\",\n \"redirectUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"url": "https://dashboard.hifibridge.com/accept-terms-of-service?sessionToken=e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40&redirectUrl=undefined&templateId=2fb2da24-472a-4e5b-b160-038d9dc82a40",
"signedAgreementId": "e12d9c3f-75a8-4bd1-aa3d-97a2cfaf2c40"
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"code": 123,
"error": "<string>",
"errorDetails": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Unique identifier for the resource
Id of the custom terms of service template generated in the HIFI developer dashboard. If not passed, the page will use HIFI's default template.
Url to redirect after accepting the terms of service link. The signedAgreementId is the same as the passed idempotencyKey, you may attempt to call the POST /user/create endpoint, but if the user did not accept the TOS, the user creation will return an error.
⌘I