import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.vpnSessions.refreshPassword({
vpnSessionId: "vpn_pRMLydp0dQKr1",
});
console.log(result);
}
run();{
"data": {
"id": "vpn_pRMLydp0dQKr1",
"type": "vpn_sessions",
"attributes": {
"user_name": "Alexis",
"password": "34xr0yTqaTrNyJFI",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo 279",
"country": "Germany 292",
"site": {
"id": "loc_3YjJOLexdvZ87",
"name": "São Paulo 279",
"slug": "SAO",
"facility": "São Paulo 279"
}
},
"expires_at": "2026-01-14T15:58:20+00:00",
"created_at": "2026-01-14T15:57:20+00:00",
"updated_at": "2026-01-14T15:57:20+00:00"
}
},
"meta": {}
}Refreshing an existing VPN Session will create new credentials for that session
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.vpnSessions.refreshPassword({
vpnSessionId: "vpn_pRMLydp0dQKr1",
});
console.log(result);
}
run();{
"data": {
"id": "vpn_pRMLydp0dQKr1",
"type": "vpn_sessions",
"attributes": {
"user_name": "Alexis",
"password": "34xr0yTqaTrNyJFI",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo 279",
"country": "Germany 292",
"site": {
"id": "loc_3YjJOLexdvZ87",
"name": "São Paulo 279",
"slug": "SAO",
"facility": "São Paulo 279"
}
},
"expires_at": "2026-01-14T15:58:20+00:00",
"created_at": "2026-01-14T15:57:20+00:00",
"updated_at": "2026-01-14T15:57:20+00:00"
}
},
"meta": {}
}Was this page helpful?