ดูข้อมูลเกี่ยวกับ Picker API ใหม่และการเปลี่ยนแปลงที่สำคัญของ Library API
ดูรายละเอียดที่นี่
Method: sessions.delete
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ลบเซสชันที่ระบุ
ระบบจะแสดงข้อผิดพลาด NOT_FOUND
หากไม่มีเซสชันหรือผู้ใช้ไม่ได้เป็นเจ้าของเซสชัน
หากการแสดงผลเป็นเซลล์ว่าง นั่นแสดงว่าลบสำเร็จ
คำขอ HTTP
DELETE https://photospicker.googleapis.com/v1/sessions/{sessionId}
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
sessionId |
string
ต้องระบุ ตัวระบุที่ Google สร้างขึ้นสำหรับเซสชันที่จะลบ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะเป็นออบเจ็กต์ JSON ว่าง
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/photospicker.mediaitems.readonly
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eDeletes the specified photo session if it exists and is owned by the user.\u003c/p\u003e\n"],["\u003cp\u003eReturns a \u003ccode\u003eNOT_FOUND\u003c/code\u003e error if the session doesn't exist or isn't owned by the user, and an empty response upon successful deletion.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/photospicker.mediaitems.readonly\u003c/code\u003e scope.\u003c/p\u003e\n"],["\u003cp\u003eThe request should be a \u003ccode\u003eDELETE\u003c/code\u003e request to \u003ccode\u003ehttps://photospicker.googleapis.com/v1/sessions/{sessionId}\u003c/code\u003e with an empty body, where \u003ccode\u003e{sessionId}\u003c/code\u003e is the session ID.\u003c/p\u003e\n"]]],["The provided content outlines the process for deleting a session via an HTTP `DELETE` request to a specific URL. The `sessionId` is a mandatory path parameter. The request body must be empty. A successful deletion results in an empty response body; a `NOT_FOUND` error indicates the session's absence or incorrect ownership. This operation necessitates the `https://www.googleapis.com/auth/photospicker.mediaitems.readonly` OAuth scope for authorization.\n"],null,["# Method: sessions.delete\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\nDeletes the specified session.\n\nA `NOT_FOUND` error is returned if the session does not exist or is not owned by the user.\n\nAn empty response indicates successful deletion.\n\n### HTTP request\n\n`DELETE https://photospicker.googleapis.com/v1/sessions/{sessionId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------|-------------------------------------------------------------------------------|\n| `sessionId` | `string` Required. The Google-generated identifier for the session to delete. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/photospicker.mediaitems.readonly`"]]