curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/metadata/social-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/metadata/social-image"
payload = { "social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
social_image_url: 'https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/metadata/social-image', 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://app.base44.com/api/apps/{app_id}/metadata/social-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'social_image_url' => 'https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/metadata/social-image"
payload := strings.NewReader("{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/metadata/social-image")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/metadata/social-image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6820f3a4e7b91d003c45a1f2",
"social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png"
}Set social image
Sets the image shown when someone shares a link to the app, or removes it.
Send an https URL, such as the public link from Upload app file, or null to remove the image. Leaving social_image_url out also removes it. The URL isn’t fetched or checked. The published app picks up the change within moments, without a new deploy. A preview image set for a specific page takes precedence on that page, and without a social image, link previews fall back to the app’s logo.
curl --request POST \
--url https://app.base44.com/api/apps/{app_id}/metadata/social-image \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png"
}
'import requests
url = "https://app.base44.com/api/apps/{app_id}/metadata/social-image"
payload = { "social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
social_image_url: 'https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png'
})
};
fetch('https://app.base44.com/api/apps/{app_id}/metadata/social-image', 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://app.base44.com/api/apps/{app_id}/metadata/social-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'social_image_url' => 'https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/apps/{app_id}/metadata/social-image"
payload := strings.NewReader("{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/apps/{app_id}/metadata/social-image")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/apps/{app_id}/metadata/social-image")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"social_image_url\": \"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png\"\n}"
response = http.request(request)
puts response.read_body{
"id": "6820f3a4e7b91d003c45a1f2",
"social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png"
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
ID of the app to set the social image on.
Body
https URL of the image to show in link previews, up to 2048 characters, or null to remove the current one. Leaving it out also removes it.
2048"https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png"
Response
The app with its new social image.
Doc-only: the handler returns the whole app document.
Was this page helpful?