0

Get list of available integrations

by
Published Oct 17, 2025

Retrieve a list of all available provider integrations on the API.

Script terra Verified

The script

Submitted by hugo697 Bun
Verified 235 days ago
1
//native
2
/**
3
 * Get list of available integrations
4
 * Retrieve a list of all available provider integrations on the API.
5
 */
6
export async function main(auth: RT.Terra) {
7
	const url = new URL(`https://api.tryterra.co/v2/integrations`)
8

9
	const response = await fetch(url, {
10
		method: 'GET',
11
		headers: {
12
			'dev-id': auth.devId,
13
			'X-api-key': auth.apiKey
14
		},
15
		body: undefined
16
	})
17
	if (!response.ok) {
18
		const text = await response.text()
19
		throw new Error(`${response.status} ${text}`)
20
	}
21
	return await response.json()
22
}
23