Check out our upcoming events and meetups! View events →
Retrieve Wireguard config template for Peer
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.wireguardPeers.retrieveConfig('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(response);"[Interface]\nPrivateKey = <! INSERT PEER PRIVATE KEY HERE !>\nAddress = 198.51.100.1/32\n\n[Peer]\nPublicKey = qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=\nAllowedIPs = 198.51.100.0/29\nEndpoint = 203.0.113.0:51871\nPersistentKeepalive = 25\n"Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Identifies the resource.
"6a09cdc3-8948-47f0-aa62-74ac943d6c58"
Successful response
The response is of type string.
"[Interface]\nPrivateKey = <! INSERT PEER PRIVATE KEY HERE !>\nAddress = 198.51.100.1/32\n\n[Peer]\nPublicKey = qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=\nAllowedIPs = 198.51.100.0/29\nEndpoint = 203.0.113.0:51871\nPersistentKeepalive = 25\n"
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.wireguardPeers.retrieveConfig('6a09cdc3-8948-47f0-aa62-74ac943d6c58');
console.log(response);"[Interface]\nPrivateKey = <! INSERT PEER PRIVATE KEY HERE !>\nAddress = 198.51.100.1/32\n\n[Peer]\nPublicKey = qF4EqlZq+5JL2IKYY8ij49daYyfKVhevJrcDxdqC8GU=\nAllowedIPs = 198.51.100.0/29\nEndpoint = 203.0.113.0:51871\nPersistentKeepalive = 25\n"