Skip to main content
GET
/
wireguard_peers
/
{id}
/
config
JavaScript
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"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Identifies the resource.

Example:

"6a09cdc3-8948-47f0-aa62-74ac943d6c58"

Response

Successful response

The response is of type string.

Example:

"[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"