Get a link
curl --request GET \
--url https://trimyourl.com/api/v1/links/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://trimyourl.com/api/v1/links/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://trimyourl.com/api/v1/links/{id}', 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://trimyourl.com/api/v1/links/{id}",
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://trimyourl.com/api/v1/links/{id}"
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://trimyourl.com/api/v1/links/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://trimyourl.com/api/v1/links/{id}")
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{
"id": "8f3c1a2b-4d5e-6789-abcd-ef0123456789",
"title": "Spring launch",
"slug": "spring-launch",
"shortUrl": "https://go.northwind.com/spring-launch",
"destination": "https://northwind.com/spring",
"domain": "go.northwind.com",
"folderId": null,
"campaignId": null,
"tags": [
"launch",
"instagram"
],
"note": null,
"humanClicks": 42,
"clicks": 50,
"health": "ok",
"expiresAt": null,
"passwordProtected": false,
"iosUrl": null,
"androidUrl": null,
"fallbackUrl": null,
"redirectCode": 302,
"utm": {
"source": "instagram",
"medium": "social",
"campaign": "spring",
"term": null,
"content": null,
"append": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Links
Get a link
Returns one link in the authenticated workspace.
GET
/
api
/
v1
/
links
/
{id}
Get a link
curl --request GET \
--url https://trimyourl.com/api/v1/links/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://trimyourl.com/api/v1/links/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://trimyourl.com/api/v1/links/{id}', 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://trimyourl.com/api/v1/links/{id}",
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://trimyourl.com/api/v1/links/{id}"
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://trimyourl.com/api/v1/links/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://trimyourl.com/api/v1/links/{id}")
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{
"id": "8f3c1a2b-4d5e-6789-abcd-ef0123456789",
"title": "Spring launch",
"slug": "spring-launch",
"shortUrl": "https://go.northwind.com/spring-launch",
"destination": "https://northwind.com/spring",
"domain": "go.northwind.com",
"folderId": null,
"campaignId": null,
"tags": [
"launch",
"instagram"
],
"note": null,
"humanClicks": 42,
"clicks": 50,
"health": "ok",
"expiresAt": null,
"passwordProtected": false,
"iosUrl": null,
"androidUrl": null,
"fallbackUrl": null,
"redirectCode": 302,
"utm": {
"source": "instagram",
"medium": "social",
"campaign": "spring",
"term": null,
"content": null,
"append": true
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Response
The link.