GET
/api/widget/scriptGET /api/widget/script
Responses
200Successful response
Example request
curl -X GET \
'https://api.example.com/api/widget/script' \
-H 'Authorization: Bearer YOUR_API_KEY' \import json
import requests
url = "https://api.example.com/api/widget/script"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
response.raise_for_status()
print(response.json())const res = await fetch("https://api.example.com/api/widget/script", {
method: "GET",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
if (!res.ok) throw new Error(await res.text());
const data = await res.json();package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.example.com/api/widget/script"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}import { createSdk } from "./sdk";
const api = createSdk({
baseUrl: "https://api.example.com",
headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const data = await api.default.getApiWidgetScript();