{"id":3169,"date":"2023-07-06T09:25:04","date_gmt":"2023-07-06T01:25:04","guid":{"rendered":"https:\/\/www.vmlogin.us\/help\/?p=3169"},"modified":"2023-08-14T13:06:29","modified_gmt":"2023-08-14T05:06:29","slug":"close-tab","status":"publish","type":"post","link":"https:\/\/www.vmlogin.us\/help\/api\/close-tab.html","title":{"rendered":"API Closed TAB"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Closed Tab using the API:<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">1. First open the browser using the&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.vmlogin.us\/help\/api\/start-browser-profile.html\" target=\"_blank\">profile\/start<\/a><\/strong>&nbsp;interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"513\" src=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-1-1.png\" alt=\"\" class=\"wp-image-3170\" srcset=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-1-1.png 866w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-1-1-300x178.png 300w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-1-1-768x455.png 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/figure>\n\n\n\n<p><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\">2. Check the Tab ID based on the address and interface spliced\/json returned by&nbsp;<strong><a href=\"https:\/\/www.vmlogin.us\/help\/api\/start-browser-profile.html\" target=\"_blank\" rel=\"noreferrer noopener\">profile\/start<\/a><\/strong>.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Eg.&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">http:\/\/127.0.0.1:18500\/json<\/mark><\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"868\" height=\"654\" src=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-2-1.png\" alt=\"\" class=\"wp-image-3171\" srcset=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-2-1.png 868w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-2-1-300x226.png 300w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/11-2-1-768x579.png 768w\" sizes=\"auto, (max-width: 868px) 100vw, 868px\" \/><\/figure>\n\n\n\n<p><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\">3. Closed Tab:<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Request Url:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">http:\/\/127.0.0.1:35000\/api\/v1\/profile\/page\/close<\/mark><\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">Request Type: GET<\/p>\n\n\n\n<figure class=\"wp-block-table has-medium-font-size\"><table><tbody><tr><td><strong><strong>Name<\/strong><\/strong><\/td><td><strong><strong>Type<\/strong><\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>required<\/strong><\/td><\/tr><tr><td>profileId<\/td><td>string<\/td><td>Browser profile ID<\/td><td>true<\/td><\/tr><tr><td>id<\/td><td>string<\/td><td>Close TAB by id. <br>Default: Close the currently active TAB page.<\/td><td>false<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">Body<br>x-www-form-urlencoded<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">{\n    \"profileId\": \"2B8EC47C-FF41-4629-8135-E040DDFEE862a\",\n    \"id\": \"9160D076D782A65125C4AD1B014B1B23\"\n}<\/mark><\/code><\/pre>\n\n\n\n<p><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Note:<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">(1) When using the local interface, you need to Enable browser automation settings on the VMLogin client and save the settings. Please refer to the tutorial&nbsp;<strong><a href=\"https:\/\/www.vmlogin.us\/help\/api\/browser-automation-interface.html\" target=\"_blank\" rel=\"noreferrer noopener\">\"Launch the browser automation port\"<\/a><\/strong>;<\/p>\n\n\n\n<p class=\"has-medium-font-size\">(2) For profiled, please refer to the tutorial&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.vmlogin.us\/help\/api\/where-is-profile-id.html\" target=\"_blank\">\"Where is the profile ID\"<\/a><\/strong> or use the&nbsp;<strong><a href=\"https:\/\/www.vmlogin.us\/help\/api\/get-list-of-available-browser-profile.html\">profile\/list interface<\/a><\/strong>&nbsp;to get all profileId.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"870\" height=\"545\" src=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/12.png\" alt=\"\" class=\"wp-image-3173\" srcset=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/12.png 870w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/12-300x188.png 300w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/07\/12-768x481.png 768w\" sizes=\"auto, (max-width: 870px) 100vw, 870px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Closed Tab using the API: 1. First open the browser usi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-3169","post","type-post","status-publish","format-standard","hentry","category-api"],"_links":{"self":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/comments?post=3169"}],"version-history":[{"count":6,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3169\/revisions"}],"predecessor-version":[{"id":3432,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3169\/revisions\/3432"}],"wp:attachment":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/media?parent=3169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/categories?post=3169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/tags?post=3169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}