} } else { throw new Exception($uploadResult->error_message); } } catch (Exception $e) { $error = 'ERROR: ' . $e->getMessage() . "\n"; F3::set('error', $error); } } F3::set("fileId", $fileGuId); //Create Annotation Api object $antApi = new AntApi($apiClient); $antApi->setBasePath($basePath); try { //Set file sesion callback - will be trigered when user add, remove or edit commit for annotation $setCallback = $antApi->SetSessionCallbackUrl($clientID, $fileGuId, $callbackUrl); if ($setCallback->status == 'Ok') { //Generate iframe URL for iframe if ($basePath == "https://api.groupdocs.com/v2.0") { //iframe to prodaction server $url = "https://apps.groupdocs.com/document-annotation2/embed/" . $fileGuId; //iframe to dev server } elseif ($basePath == "https://dev-api.groupdocs.com/v2.0") { $url = 'https://dev-apps.groupdocs.com/document-annotation2/embed/' . $fileGuId; //iframe to test server } elseif ($basePath == "https://stage-api-groupdocs.dynabic.com/v2.0") { $url = 'https://stage-apps-groupdocs.dynabic.com/document-annotation2/embed/' . $fileGuId; } elseif ($basePath == "http://realtime-api.groupdocs.com") { $url = 'http://realtime-apps.groupdocs.com/document-annotation2/embed/' . $fileGuId; } //Get all users from accaunt