Authorizations
Path Parameters
Response
200 - application/vnd.api+json
Success
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.VpnSessions.RefreshPassword(ctx, "vpn_6VE1Wd37dXnZJ")
if err != nil {
log.Fatal(err)
}
if res.VpnSessionWithPassword != nil {
// handle response
}
}{
"data": {
"id": "vpn_6VE1Wd37dXnZJ",
"type": "vpn_sessions",
"attributes": {
"user_name": "Dina",
"password": "5n6HCdn1wYYUC",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo",
"country": "Germany",
"site": {
"id": "loc_LMmAD8wyqwop2",
"name": "São Paulo",
"slug": "SAO",
"facility": "São Paulo"
}
},
"expires_at": "2025-07-16T18:38:19+00:00",
"created_at": "2025-07-16T18:37:19+00:00",
"updated_at": "2025-07-16T18:37:19+00:00"
}
},
"meta": {}
}Refreshing an existing VPN Session will create new credentials for that session
package main
import(
"context"
"os"
latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
"log"
)
func main() {
ctx := context.Background()
s := latitudeshgosdk.New(
latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
)
res, err := s.VpnSessions.RefreshPassword(ctx, "vpn_6VE1Wd37dXnZJ")
if err != nil {
log.Fatal(err)
}
if res.VpnSessionWithPassword != nil {
// handle response
}
}{
"data": {
"id": "vpn_6VE1Wd37dXnZJ",
"type": "vpn_sessions",
"attributes": {
"user_name": "Dina",
"password": "5n6HCdn1wYYUC",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo",
"country": "Germany",
"site": {
"id": "loc_LMmAD8wyqwop2",
"name": "São Paulo",
"slug": "SAO",
"facility": "São Paulo"
}
},
"expires_at": "2025-07-16T18:38:19+00:00",
"created_at": "2025-07-16T18:37:19+00:00",
"updated_at": "2025-07-16T18:37:19+00:00"
}
},
"meta": {}
}Success
Show child attributes
Was this page helpful?