import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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"Retrieve Wireguard config template for Peer
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
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"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?