Get scripts configuration
curl --request GET \
--url https://api.nango.dev/scripts/config \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nango.dev/scripts/config"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nango.dev/scripts/config', 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.nango.dev/scripts/config",
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.nango.dev/scripts/config"
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.nango.dev/scripts/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/scripts/config")
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{
"providerConfigKey": "<string>",
"syncs": [
{
"id": 123,
"name": "github-issues",
"enabled": true,
"type": "sync",
"json_schema": {},
"runs": "every 30 minutes",
"track_deletes": true,
"auto_start": true,
"last_deployed": "2024-02-01T09:09:03.502Z",
"is_public": true,
"pre_built": true,
"version": "0.0.3",
"attributes": {},
"input": {},
"returns": [
"GithubIssue"
],
"description": "Fetches the Github issues from all a user's repositories.\nDetails: doesn't track deletes, metadata is not required.\n",
"scopes": [
"public_repo"
],
"endpoints": [
{}
],
"webhookSubscriptions": [
"<string>"
],
"models": [
{
"name": "<string>",
"fields": "<array>"
}
]
}
],
"actions": [
{
"id": 123,
"name": "github-issues",
"type": "action",
"last_deployed": "2024-02-28T20:16:38.052Z",
"is_public": false,
"pre_built": false,
"version": "4",
"attributes": {},
"input": {},
"returns": {},
"description": "Fetches the Github issues from all a user's repositories.\nDetails: doesn't track deletes, metadata is not required.\n",
"scopes": [
"public_repo"
],
"endpoints": [
{}
],
"models": [
{
"name": "<string>",
"fields": "<array>"
}
]
}
],
"on-events": [
"<string>"
],
"provider": "github"
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}Functions
Get integration functions config
Return the configuration for all integration functions.
GET
/
scripts
/
config
Get scripts configuration
curl --request GET \
--url https://api.nango.dev/scripts/config \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nango.dev/scripts/config"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nango.dev/scripts/config', 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.nango.dev/scripts/config",
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.nango.dev/scripts/config"
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.nango.dev/scripts/config")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/scripts/config")
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{
"providerConfigKey": "<string>",
"syncs": [
{
"id": 123,
"name": "github-issues",
"enabled": true,
"type": "sync",
"json_schema": {},
"runs": "every 30 minutes",
"track_deletes": true,
"auto_start": true,
"last_deployed": "2024-02-01T09:09:03.502Z",
"is_public": true,
"pre_built": true,
"version": "0.0.3",
"attributes": {},
"input": {},
"returns": [
"GithubIssue"
],
"description": "Fetches the Github issues from all a user's repositories.\nDetails: doesn't track deletes, metadata is not required.\n",
"scopes": [
"public_repo"
],
"endpoints": [
{}
],
"webhookSubscriptions": [
"<string>"
],
"models": [
{
"name": "<string>",
"fields": "<array>"
}
]
}
],
"actions": [
{
"id": 123,
"name": "github-issues",
"type": "action",
"last_deployed": "2024-02-28T20:16:38.052Z",
"is_public": false,
"pre_built": false,
"version": "4",
"attributes": {},
"input": {},
"returns": {},
"description": "Fetches the Github issues from all a user's repositories.\nDetails: doesn't track deletes, metadata is not required.\n",
"scopes": [
"public_repo"
],
"endpoints": [
{}
],
"models": [
{
"name": "<string>",
"fields": "<array>"
}
]
}
],
"on-events": [
"<string>"
],
"provider": "github"
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"errors": [
{}
]
}
}Requires an API key with the
environment:integrations:list_functions scope. Learn more about API key scopes./scripts/config endpoint returns the configuration for all integration functions. There are two variants of this endpoint:
/scripts/config?format=nango- Returns the standard configuration format/scripts/config?format=openai- Returns the configuration in OpenAIβs function calling format
OpenAI Function Format
The/scripts/config?format=openai endpoint transforms the script configurations into OpenAIβs function calling format. This format is particularly useful when working with OpenAIβs API to enable function calling capabilities.
Parameter Descriptions
The endpoint automatically parses parameter descriptions from the scriptβs description field. If a scriptβs description contains a markdown list of parameters, these descriptions will be used for the corresponding parameters in the OpenAI function format. For example, in your script file, you can define a script like this:google-calendar/actions/move-event.ts
export default createAction({
description: `Move an event to a different time or calendar with the following parameters:
- eventId: The ID of the event to move
- start: New start time in ISO format (e.g., "2024-03-28T14:00:00")
- end: New end time in ISO format (e.g., "2024-03-28T15:00:00")
- calendar: Optional new calendar ID to move the event to`,
version: '1.0.0',
endpoints: [{ method: 'GET', path: '/example/github/issues', group: 'Issues' }],
frequency: 'every hour',
autoStart: false,
scopes: ['https://www.googleapis.com/auth/calendar'],
input: z.object({
eventId: z.string(),
start: z.string(),
end: z.string(),
calendar: z.string().optional()
})
});
{
"data": [
{
"name": "move-event",
"description": "Move an event to a different time or calendar with the following parameters:\n- eventId: The ID of the event to move\n- start: New start time in ISO format (e.g., \"2024-03-28T14:00:00\")\n- end: New end time in ISO format (e.g., \"2024-03-28T15:00:00\")\n- calendar: Optional new calendar ID to move the event to",
"parameters": {
"type": "object",
"properties": {
"eventId": {
"type": "string",
"description": "The ID of the event to move"
},
"start": {
"type": "string",
"description": "New start time in ISO format (e.g., \"2024-03-28T14:00:00\")"
},
"end": {
"type": "string",
"description": "New end time in ISO format (e.g., \"2024-03-28T15:00:00\")"
},
"calendar": {
"type": "string",
"description": "Optional new calendar ID to move the event to"
}
},
"required": ["eventId", "start", "end"]
}
}
]
}
Array Fields
The endpoint properly handles array fields in the configuration. For example, if a field is defined as:google-calendar/actions/create-event.ts
export default createAction({
description: `Create a new calendar event with the following parameters:
- summary: The title of the event
- attendees: List of email addresses of event attendees`,
version: '1.0.0',
endpoints: [{ method: 'POST', path: '/example/google-calendar/events', group: 'Events' }],
input: z.object({
summary: z.string(),
attendees: z.array(z.string()).optional()
})
});
{
"data": [
{
"name": "create-event",
"description": "Create a new calendar event with the following parameters:\n- summary: The title of the event\n- attendees: List of email addresses of event attendees",
"parameters": {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "The title of the event"
},
"attendees": {
"type": "array",
"description": "List of email addresses of event attendees",
"items": {
"type": "string"
}
}
},
"required": ["summary"]
}
}
]
}
Authorizations
An Environment API key from your Nango environment, or an Account API key for account-level endpoints.
Query Parameters
The output type of the script configuration
Available options:
nango, openai Was this page helpful?