คุณกำลังดูเอกสารประกอบเดิมสำหรับ Google Photos Library API
Method: albums.unshare
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ทำเครื่องหมายอัลบั้มที่แชร์ก่อนหน้านี้ว่าเป็นส่วนตัว ซึ่งหมายความว่าอัลบั้มดังกล่าวจะไม่มีการแชร์อีกต่อไป และผู้ที่ไม่ใช่เจ้าของทุกรายจะไม่สามารถเข้าถึงอัลบั้มได้ ระบบจะนำเนื้อหาทั้งหมดที่ไม่ใช่ของเจ้าของออกจากอัลบั้ม หากผู้ที่ไม่ใช่เจ้าของได้เพิ่มอัลบั้มลงในคลังภาพไว้ก่อนหน้านี้ ผู้ที่ไม่ใช่เจ้าของจะจัดเก็บรูปภาพทั้งหมดไว้ในคลังภาพของตน การดำเนินการนี้จะทำได้เฉพาะในอัลบั้มที่นักพัฒนาซอฟต์แวร์สร้างผ่าน API เท่านั้น
คำขอ HTTP
POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:unshare
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
albumId |
string
ต้องระบุ ตัวระบุของอัลบั้มที่จะยกเลิกการแชร์ รหัสอัลบั้มนี้ต้องเป็นอัลบั้มที่นักพัฒนาแอปสร้างขึ้น
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากสำเร็จ เนื้อหาการตอบกลับจะว่างเปล่า
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/photoslibrary.sharing
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eUnshares a previously shared album, making it private and removing non-owner access.\u003c/p\u003e\n"],["\u003cp\u003eNon-owners who added the album to their library will retain their photos, but lose access to the shared album.\u003c/p\u003e\n"],["\u003cp\u003eOnly albums created by the developer via the API can be unshared using this method.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should be empty, and a successful response will also be empty.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/photoslibrary.sharing\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["The content details how to unshare a previously shared album via API. It uses a `POST` request to the provided URL, including the `albumId` as a path parameter. The request body must be empty. Upon successful execution, the response body will also be empty. This action removes non-owners' access and content from the album. Only albums created through the API can be unshared. It also requires the `https://www.googleapis.com/auth/photoslibrary.sharing` OAuth scope.\n"],null,["# Method: albums.unshare\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nMarks a previously shared album as private. This means that the album is no longer shared and all the non-owners will lose access to the album. All non-owner content will be removed from the album. If a non-owner has previously added the album to their library, they will retain all photos in their library. This action can only be performed on albums which were created by the developer via the API.\n\n### HTTP request\n\n`POST https://photoslibrary.googleapis.com/v1/albums/{albumId}:unshare`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------|\n| `albumId` | `string` Required. Identifier of the album to be unshared. This album id must belong to an album created by the developer. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is empty.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/photoslibrary.sharing`"]]