Skip to main content
GET
/
document
/
secure
/
id
/
{secureDocumentId}
/
download
/
url
Get secure document download URL
curl --request GET \
  --url https://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url', 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://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$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://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-stage.karmacheck.io/document/secure/id/{secureDocumentId}/download/url")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
"https://s3.amazonaws.com/stage.private.storage-bin.karmacheck.io/escreen-gkfQxkAStpb7VxOw9gsT-doc-ohs-occupational-health.pdf?AWSAccessKeyId=ASIATUZWO5YBFFZWEDDR&Expires=1698176316&Signature=JEiJoN04lEsSTk212%2BQeXN7On%2B8%3D&X-Amzn-Trace-Id=Root%3D1-65380f2c-2e8f8372612dc45d463cf244%3BParent%3D51f9b6490fd41e98%3BSampled%3D0%3BLineage%3De3b20767%3A0&x-amz-security-token=FwoGZXIvYXdzEDQaDIDz3VR%2FxjmXT%2Fw2PSK7Acn2jWag5OEjzrRGT37r%2FZWKUfgFrYIceTA401Psv1sTisbuYMbSkdpQWEhM2%2B65%2BZMvO3tuZN9waO7XfCsXK5LpyV79VJobVTs89tjEasjV6WZdiI%2FoHf0qs%2BKPbZeBtvUlvI6xGOrj6KOFKxxF%2BZyxHb8FxUS6CnRf50oiCmyrR4rOMKqFFzUdfC3yS5eVIp2T6sAEl1FZcfsOUKG4eRZ%2BAvSG0It3xXo89ChDIXvXY4AE5ETiBX3yucMorJ7gqQYyLeH7XjvfVyel85XfJsdOrBsimh3CwpZ4ARtPih7y%2F71XLerGQpOhCZhyf1g5Pg%3D%3D"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

secureDocumentId
string
required

The ID of the document to download.

Response

OK

The response is of type string.