from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.vpn_sessions.refresh_password(vpn_session_id="vpn_pRMLydp0dQKr1")
# Handle response
print(res){
"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
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.vpn_sessions.refresh_password(vpn_session_id="vpn_pRMLydp0dQKr1")
# Handle response
print(res){
"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?