curl --request GET \
--url https://api.feedspace.io/v3/embed-code \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.feedspace.io/v3/embed-code"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.feedspace.io/v3/embed-code', 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.feedspace.io/v3/embed-code",
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: Basic <encoded-value>"
],
]);
$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.feedspace.io/v3/embed-code"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.feedspace.io/v3/embed-code")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.feedspace.io/v3/embed-code")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"type": "widget",
"id": "b1d0f3c2-3f4a-4a2b-9c5e-9f0a1b2c3d4e",
"embed_code": "<div class=\"feedspace-embed\" data-id=\"b1d0f3c2-3f4a-4a2b-9c5e-9f0a1b2c3d4e\"></div><script src=\"https://js.feedspace.io/v1/embed/embed.min.js\" type=\"text/javascript\" async></script>"
}Get Embed Code
Return the two-line embed snippet for a Wall of Love page or a widget: the <div class="feedspace-embed"> element followed by the <script> tag that loads it. This is the same snippet the dashboard Share tab copies. Name the resource with type (page or widget) and pass its id. The id is resolved within the workspace your API key belongs to, so an id from another workspace, or one that does not exist, returns 404.
curl --request GET \
--url https://api.feedspace.io/v3/embed-code \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.feedspace.io/v3/embed-code"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.feedspace.io/v3/embed-code', 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.feedspace.io/v3/embed-code",
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: Basic <encoded-value>"
],
]);
$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.feedspace.io/v3/embed-code"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.feedspace.io/v3/embed-code")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.feedspace.io/v3/embed-code")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"type": "widget",
"id": "b1d0f3c2-3f4a-4a2b-9c5e-9f0a1b2c3d4e",
"embed_code": "<div class=\"feedspace-embed\" data-id=\"b1d0f3c2-3f4a-4a2b-9c5e-9f0a1b2c3d4e\"></div><script src=\"https://js.feedspace.io/v1/embed/embed.min.js\" type=\"text/javascript\" async></script>"
}<div class="feedspace-embed"> element and the <script> tag that loads it. This is the
same code the dashboard Share tab copies.
Choosing the resource
Settype to page for a Wall of Love page or widget for a widget, and pass its id.
Where the id comes from
type | id | Where to find it |
|---|---|---|
page | unique_page_id (for example page_3quM56ynXjoHeUsRPqrBe1f9) | All Pages |
widget | the widget’s id | Copy it from the widget’s Share tab in the dashboard |
id is resolved within the workspace your API key belongs to. An id from another
workspace, or one that does not exist, returns 404.
Response
| Field | Type | Description |
|---|---|---|
type | string | Echoes the type you requested. |
id | string | Echoes the id you requested. |
embed_code | string | The two-line snippet to paste into a web page. For a Wall of Love page it reflects the page’s own dark-background setting. |
Authorizations
HTTP Basic Authentication using API Key and Secret Key. The credentials should be Base64 encoded in the format 'api_key:secret_key'. You can obtain your API Key and Secret Key from Feedspace → Automation → API (https://app.feedspace.io/automation/api).
Query Parameters
What the embed code is for: page for a Wall of Love page, or widget for a widget.
page, widget The id of the page or widget. A page id (unique_page_id) comes from the All Pages endpoint. A widget id is copied from the widget's Share tab in the dashboard.