Get an environment
curl --request GET \
--url https://api.nango.dev/environments/{environmentUuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nango.dev/environments/{environmentUuid}"
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/environments/{environmentUuid}', 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/environments/{environmentUuid}",
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/environments/{environmentUuid}"
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/environments/{environmentUuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/environments/{environmentUuid}")
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{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true
}
}
}
{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"otlp_headers": [],
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true,
"signing_key": "5f1c0d2e-6a1b-4f3c-9d8e-7b6a5c4d3e2f"
}
}
}
Environments
Get an environment
Retrieve an environment’s configuration.
GET
/
environments
/
{environmentUuid}
Get an environment
curl --request GET \
--url https://api.nango.dev/environments/{environmentUuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nango.dev/environments/{environmentUuid}"
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/environments/{environmentUuid}', 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/environments/{environmentUuid}",
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/environments/{environmentUuid}"
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/environments/{environmentUuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nango.dev/environments/{environmentUuid}")
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{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true
}
}
}
{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"otlp_headers": [],
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true,
"signing_key": "5f1c0d2e-6a1b-4f3c-9d8e-7b6a5c4d3e2f"
}
}
}
Requires an Account API key with the
account:environments:read scope.with_secrets=true to also return webhooks.signing_key and otlp_headers. This requires the additional account:environments:read_secret scope.
{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true
}
}
}
{
"data": {
"id": 123,
"uuid": "123e4567-e89b-12d3-a456-426614174001",
"name": "staging",
"is_production": false,
"callback_url": "https://api.nango.dev/oauth/callback",
"slack_notifications": false,
"otlp_endpoint": null,
"otlp_headers": [],
"webhooks": {
"primary_url": "https://example.com/webhooks/nango",
"secondary_url": null,
"on_sync_completion_always": true,
"on_auth_creation": true,
"on_auth_refresh_error": true,
"on_sync_error": true,
"on_async_action_completion": true,
"on_connection_deletion": true,
"signing_key": "5f1c0d2e-6a1b-4f3c-9d8e-7b6a5c4d3e2f"
}
}
}
Authorizations
An Environment API key from your Nango environment, or an Account API key for account-level endpoints.
Path Parameters
Environment UUID.
Query Parameters
Include the webhook signing key and OpenTelemetry headers.
Response
Successfully retrieved an environment
Show child attributes
Show child attributes
Was this page helpful?