Method: sessions.delete
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menghapus sesi yang ditentukan.
Error NOT_FOUND
ditampilkan jika sesi tidak ada atau tidak dimiliki oleh pengguna.
Respons kosong menunjukkan penghapusan yang berhasil.
Permintaan HTTP
DELETE https://photospicker.googleapis.com/v1/sessions/{sessionId}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
sessionId |
string
Wajib. ID yang dibuat Google untuk sesi yang akan dihapus.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons adalah objek JSON kosong.
Cakupan otorisasi
Memerlukan cakupan OAuth berikut:
https://www.googleapis.com/auth/photospicker.mediaitems.readonly
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-25 UTC.
[null,null,["Terakhir diperbarui pada 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`"]]