cURL
curl --request GET \
--url https://api.bsy.sh/v1/link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bsy.sh/v1/link"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bsy.sh/v1/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://api.bsy.sh/v1/link",
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.bsy.sh/v1/link"
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.bsy.sh/v1/link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bsy.sh/v1/link")
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{
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"long_url": "<string>",
"title": "<string>",
"favicon": "<string>",
"custom_link": "<string>",
"tags": [
"<string>"
],
"has_utm": true,
"has_opengraph": true,
"has_android_targeting": true,
"android_target_url": "<string>",
"has_ios_targeting": true,
"ios_target_url": "<string>",
"has_windows_targeting": true,
"windows_target_url": "<string>",
"has_linux_targeting": true,
"linux_target_url": "<string>",
"has_geo_targeting": true,
"has_cloaking": true,
"has_password": true,
"password_logo": "<string>",
"has_expiration": true,
"expiration": "2023-11-07T05:31:56Z",
"expiration_clicks": "<string>",
"is_expired": true,
"is_clicked": true,
"last_clicked": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"bitsy_url": "<string>",
"custom_url": "<string>",
"utm": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>"
},
"opengraph": {
"meta_title": "<string>",
"meta_description": "<string>",
"meta_image": "<string>"
},
"geo_targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_url": "<string>",
"country": {
"iso2": "<string>",
"name": "<string>"
}
}
],
"shareable_analytics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"share_url": "<string>",
"has_password": true
}
]
}
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>",
"errors": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"status": "error",
"message": "<string>"
}Bitsy Link
Retrieve a Bitsy Link
Retrieve a Bitsy Link by ID
GET
/
link
cURL
curl --request GET \
--url https://api.bsy.sh/v1/link \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.bsy.sh/v1/link"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.bsy.sh/v1/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://api.bsy.sh/v1/link",
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.bsy.sh/v1/link"
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.bsy.sh/v1/link")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bsy.sh/v1/link")
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{
"status": "success",
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"long_url": "<string>",
"title": "<string>",
"favicon": "<string>",
"custom_link": "<string>",
"tags": [
"<string>"
],
"has_utm": true,
"has_opengraph": true,
"has_android_targeting": true,
"android_target_url": "<string>",
"has_ios_targeting": true,
"ios_target_url": "<string>",
"has_windows_targeting": true,
"windows_target_url": "<string>",
"has_linux_targeting": true,
"linux_target_url": "<string>",
"has_geo_targeting": true,
"has_cloaking": true,
"has_password": true,
"password_logo": "<string>",
"has_expiration": true,
"expiration": "2023-11-07T05:31:56Z",
"expiration_clicks": "<string>",
"is_expired": true,
"is_clicked": true,
"last_clicked": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"bitsy_url": "<string>",
"custom_url": "<string>",
"utm": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_term": "<string>",
"utm_content": "<string>"
},
"opengraph": {
"meta_title": "<string>",
"meta_description": "<string>",
"meta_image": "<string>"
},
"geo_targets": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_url": "<string>",
"country": {
"iso2": "<string>",
"name": "<string>"
}
}
],
"shareable_analytics": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"created_at": "2023-11-07T05:31:56Z",
"share_url": "<string>",
"has_password": true
}
]
}
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>"
}{
"status": "failure",
"message": "<string>",
"errors": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"status": "error",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The unique identifier for the Bitsy Link.
Was this page helpful?
⌘I
