Hello, I am following this guide to delegate session authority to the plug-in server. On the plug-in UI, I got the sessionToken using app.getSessioninfo() method. When I try to get the session_clo...
See more...
Hello, I am following this guide to delegate session authority to the plug-in server. On the plug-in UI, I got the sessionToken using app.getSessioninfo() method. When I try to get the session_clone_ticket using REST API endpoint /api/ui/vcenter/session/clone-ticket, I get the following error: [401] Something went wrong. Check the server logs for more information Which logs should I check? Can someone please help me debug why I am getting this error. My POST request looks like this: OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \"vc-guid\": \"223b94f2-af15-4613-5d1a-a278b19abc09\"\r\n}");
Request request = new Request.Builder()
.url("https://vc-fqdn/api/ui/vcenter/session/clone-ticket")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Accept", "application/json")
.addHeader("vmware-api-session-id", "\"vmw-sid:[issuer:e7b5f32e-3b70-4668-9b52-b3bd17075008,version:2,value:bdMkwgnaXutxYpTWdvYdV1SJuXxVF8AFiOJh+v/E2/s=]\"")
.build();
Response response = client.newCall(request).execute(); Note: I have also tried using only value from sessionToken bdMkwgnaXutxYpTWdvYdV1SJuXxVF8AFiOJh+v/E2/s= as vmware-api-session-id, but still got the same error. Thanks in advance!