Public share links
What someone with a share link sees, without signing in: the item (or folder listing), unlocking a password-protected link, downloading, and thumbnails.
| Method | Path | Summary |
|---|---|---|
| GET | /api/public/:token | Open a share link |
| POST | /api/public/:token/unlock | Unlock a password-protected share link |
| GET | /api/public/:token/content | Download from a share link |
| GET | /api/public/:token/thumb | Thumbnail from a share link |
#Open a share link
GET
/api/public/:token- Address
https://<your-org>.brambleit.cloud/drive/api/public/:token- Requires
- None: public, or protected by a token in the address or body.
Path parameters
| Name | Type | Description |
|---|---|---|
tokenrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
item | number | Inside a shared folder, the item to show. |
Response 200
| Field | Type | Description |
|---|---|---|
needs_password | boolean |
Example response
JSON
{
"…base": "…",
"needs_password": false
}Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6' -Headers $headers#Unlock a password-protected share link
POST
/api/public/:token/unlock- Address
https://<your-org>.brambleit.cloud/drive/api/public/:token/unlock- Requires
- None: public, or protected by a token in the address or body.
- Headers
x-forwarded-proto
Path parameters
| Name | Type | Description |
|---|---|---|
tokenrequired | string |
Request body JSON
| Name | Type | Description |
|---|---|---|
password | any | The link's password. |
Response 200
| Field | Type | Description |
|---|---|---|
ok | boolean |
Example response
JSON
{
"ok": true
}Errors
| Status | Message |
|---|---|
| 403 | That password isn't right |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/unlock' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"password":"…"}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/unlock', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"password":"…"}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/unlock",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"password":"…"},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"password":"…"}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/unlock' -Headers $headers -ContentType 'application/json' -Body $body#Download from a share link
GET
/api/public/:token/content- Address
https://<your-org>.brambleit.cloud/drive/api/public/:token/content- Requires
- None: public, or protected by a token in the address or body.
Path parameters
| Name | Type | Description |
|---|---|---|
tokenrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
item | number | |
download | boolean |
Errors
| Status | Message |
|---|---|
| 400 | Not a file |
| 403 | Downloading is turned off for this link |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/content' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/content', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/content",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/content' -Headers $headers#Thumbnail from a share link
GET
/api/public/:token/thumb- Address
https://<your-org>.brambleit.cloud/drive/api/public/:token/thumb- Requires
- None: public, or protected by a token in the address or body.
Path parameters
| Name | Type | Description |
|---|---|---|
tokenrequired | string |
Query parameters
| Name | Type | Description |
|---|---|---|
item | number | |
s | number |
Response
A body.
Errors
| Status | Message |
|---|---|
| 404 | No thumbnail |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/thumb' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/thumb', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/thumb",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/drive/api/public/%E2%80%A6/thumb' -Headers $headersWas this page helpful?
Thanks for your feedback.